Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

additional condition on Variable

Hi,

I have a variable 'Sales' (with a quite complex formula behind it) that I use everywhere in my app.

On 1 chart I want an additional 'year = 2015'  to be applied, like you can do in set analysis.

But I have no clue how to use a Variable inside a Set Analysis formula.

Conceptually it is like this:

Sum ({<year={2015}>}$(Sales))

But I don't get it to work...

Any help?

2 Replies
sunny_talwar

If Sales is something like this -> Sum(Sales), then what you are trying to do won't work. I would suggest to use the expression, instead of variable in cases such as these.

Gysbert_Wassenaar

Change your variable so that it accepts a parameter. For example if a variable vSales is defined as sum(Sales) then change it to sum($1 Sales). You can then use it in an expression like this: =$(vSales({<Year={2015}>}))


talk is cheap, supply exceeds demand