Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis expression based on variable value

Hi

I'm using QlikView Components to generate a master calendar table and set analysis variables. This allows me to easily create expressions for the current year to date and comparisons to the previous year. For example:

Total amount in year to date: Sum($(vSetYTD) Amount)

Total amount in the previous year to date: Sum($(vSetPreviousYearYTD) Amount)

My next goal is to provide the ability to select the period used in the set analysis.

To do this I have created three text area objects, which set a variable vSetPeriodSelection to 'YTD', 'MTD', and 'QTD' respectively.

I've tried expressions such as Sum($(IF(vSetPeriodSelection = 'YTD', vSetYTD, IF(vSetPeriodSelection = 'QTD', vSetQTD, vSetMTD))) Amount) without any success.

So my question is how do I use the value of this variable to determine the variable used in the set expression?

thanks

0 Replies