Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dollar Syntax

Morning,

I was wondering if anyone has an "Idiots guide to dollar syntax"?, further more if anyone has a similar "idiots guide to Set Analysis"?

Thanks

11 Replies
anbu1984
Master III
Master III

ashfaq_haseeb
Champion III
Champion III

Hi,

Below post might help you.

Romancing with Set Analysis

Even I have some basic attachment that might help you.

Regards

ASHFAQ

Not applicable
Author

Thanks Ashfaq,

I have read a similar document, my problem now is how to incorporate a variable into this, say for example in the following expression:

Sum({$<Year={2008}>} Sales)


I want to replace 2008 with the max year in the set, for which i have already created a variable called vMxYear. Qlikview rejects the following:


Sum({$<Year={vMxYear}>} Sales) and also

Sum({$<Year={$(vMxYear)}>} Sales)


Cheers

ashfaq_haseeb
Champion III
Champion III

Hi may be like this.

Sum({$<Year={'$(=vMxYear)'}>} Sales)

Regards

ASHFAQ

Not applicable
Author

will give it a try...thanks

Not applicable
Author

Ok that works, but it only works when the particular year is selected, how do i change it so that regardless of what is selected, that calculation returns only the last Year.

Thanks for the help

jonathandienst
Partner - Champion III
Partner - Champion III

Stephen

I assume that vMxYear is a variable. Define the variable

     =Max(Year)

(the = sign is included in the definition, so this variable always returns the maximum possible year. The max possible year is the maximum in the data set if nothing is selected, or the maximum of the selected values if one or more year is selected.

Then use it as described previously.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks but not working, if nothing is selected and everything is exactly as you guys told me to do, it sums everything.

anbu1984
Master III
Master III

Can you show your app?