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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with Function and Variable

Hello Community, I have a doubt about if it is possible create a set analysis working with function and variable at the same time.

I want to do something like this:

sum({<monthname(DateTn)={$(vMonth)}>} Amount)

Thanks for your responses.

Labels (1)
1 Solution

Accepted Solutions
Clever_Anjos
Support
Support

Please check if this works

sum({<Mes_Txn={"$(=vMonthA)"}>}Amount)

View solution in original post

7 Replies
Clever_Anjos
Support
Support

You have to use a field on left side, but you can use a variable on right side

Saravanan_Desingh
MVP
MVP

The above statement wont work.

You have to use Dimensions.

But, we can rewrite as below..

sum({<Dim1={DimValues}>} If(MonthName(DateTn)=$(vMonth), Amount))

Not applicable
Author

I created a column with the monthname of the date, and in the set analysis I compare as the following expression:

sum({<Mes_Txn={$(vMonthA)}>}Amount)

But the issue continues. vMonthA= Feb 2016 (for example)

Thanks

Clever_Anjos
Support
Support

Please check if this works

sum({<Mes_Txn={"$(=vMonthA)"}>}Amount)

Clever_Anjos
Support
Support

Anyway add your expression to a Straight Table with no label for your dimension

Mouse over your column and see how your variable is beeing evaluated

Clever_Anjos
Support
Support

Capturar.PNG

Not applicable
Author

Thanks. That works very good!!!