Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello ,
i have a problem with my expression in the layout.
I have a straight table and i calculate price and sales with variables which are definied in the layout.
Example :
productnr Price Sales
1234 101,4 3400
1234 120,5 2000
1234 130,6 4000
1234 125.8 5000
Now i want to calculate the price with the best Sales for the product, but my expression doesn't work...
my expression:
(max ({$<vSales={$(=max(vSales))}>} vPrice )
Anyone an idea ?
use below code
max({<Sales={$(=Max(Sales))}>}Price)
see the attached file
hope this helps
Yes this example works, but i use calculated variables in this expression and than it doesn't work..can it be that in qlikview the setanalysis expression not works with caculated variables?
no its not like that it will work
create a variable vMax=Max(Sales)
then use
max({<Sales={$(vMax)}>}Price) in expression
see the attached file
I tested it in my script but i can't use Sales and Price like a field in your example. I must use my variables
and when i write :
Variables: vSales : sum(set analysis expression
vPrice : vSales/Field
vMax : max(sum(set analysis expression)
max({<vSales={$(vMax)}>}vPrice)
it doesn't work and my syntax checker in the expression red lined the second {
in condtion we required to have a field and a variable .not two variable
ex:
{<vSales={$(vMax)}
it should not work.
can share sample i will look into it
hope this helps