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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
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.

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Please check if this works

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

View solution in original post

7 Replies
Clever_Anjos
Employee
Employee

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

Saravanan_Desingh

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
Employee
Employee

Please check if this works

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

Clever_Anjos
Employee
Employee

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
Employee
Employee

Capturar.PNG

Not applicable
Author

Thanks. That works very good!!!