Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

dollor sign expression set analysis

Hello

Im confusing myself, so i need some one to explain me some difference

when you eg. have expressions like this

sum({$<Year={$(vPreviousYear)}, Product=>} amount)

or

sum({<Year={$(vPreviousYear)}, Product=>} amount)

or

sum({$<Year={(vPreviousYear)}, Product=>} amount)

or

sum({1<Year={$(vPreviousYear)}, Product=>} amount)

or

sum({1<Year={1(vPreviousYear)}, Product=>} amount)

Can somebody tell me the difference between each or what each expression do?

what if i have this expression

sum({$<Year={$(vPreviousYear)}, Product=>} amount) - Can i then also have $ before Product? or how would you express that? or would you say Product=$something ??

Tags (3)
2 Replies

Re: dollor sign expression set analysis

sum({$<Year={$(vPreviousYear)}, Product=>} amount)

sum({<Year={$(vPreviousYear)}, Product=>} amount)

These two are almost always equivalent. Only when you're using alternate states that may not be true. It sums amount using the default selections, but overriding selections in Year with whatever is stored in the variable vPreviousYear and disregarding any selections in Product.

sum({$<Year={(vPreviousYear)}, Product=>} amount)

This one doesn't dollar-expand the variable, so I don't think it will work correctly

sum({1<Year={$(vPreviousYear)}, Product=>} amount)

The 1 ignores all selections, so Product= is redundant. And Year is set to the value stored in the variable vPreviousYear.

sum({1<Year={1(vPreviousYear)}, Product=>} amount)

The second 1 is incorrect and the variable isn't dollar-expanded so this expression won't work correctly.


talk is cheap, supply exceeds demand
Not applicable

Re: dollor sign expression set analysis

So bascially you could just be satisfied with sum({<Year={$(vPreviousYear)}, Product=>} amount) in most cases?

Community Browser