Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Variable in Set Analysis

Hi

I'm trying to get this to work:

=Sum({<Year={vThisYear}>}[ActivityPlan])

Have tried juggling apostrophies, speech marks etc to no avail, can anyone help please?

Cheers

Geoff

1 Solution

Accepted Solutions
sasikanth
Master
Master

hi

try some thing like below

=Sum({<Year={'$(=vThisYear)'}>}[ActivityPlan])

View solution in original post

9 Replies
avinashelite

Hi Geoff,

Please Try with this format

=Sum({<Year={$(vThisYear)}>}[ActivityPlan])

Regards,

@vi

Not applicable
Author

Hi Avi

Thanks but no joy. Have attached a screen show the nuts and bolts are in place.

Cheers

GeoffQVVariable.JPG.jpg

ThornOfCrowns
Specialist II
Specialist II

As Avinash R says, you need to use Dollar Sign Expansion to push the actual value of the variable into your expression - it's a handy thing to remember.

ThornOfCrowns
Specialist II
Specialist II

You have varThisYear in the purple box and vThisYear in the blue one. Make sure you're using the right one in your expression and to put the dollar sign in place.

avinashelite

Hi Geoff,

Can you please provide me the sample app or data, so that i can work on.

Regards,

@vi

Not applicable
Author

Hi

I have tried this with all three expressions in a chart and get an empty table back. Hard coding '2014-15' works in the expression. I'd like to get this set so I don't have to go through all the expressions in n charts this time next year.

Cheers

Geoff

Not applicable
Author

Hi

Sorry typo in purple box. Expressions in app are vThisYear and are grey and itallic.

sasikanth
Master
Master

hi

try some thing like below

=Sum({<Year={'$(=vThisYear)'}>}[ActivityPlan])

Not applicable
Author

Hi Sasikanth

Spot on  - adding the = before the variable has done the trick.

Many thanks

Geoff