Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Reuven12
Contributor II
Contributor II

Variable equal to parameter inside of set analsys

Hey, 

I have an issue with variables that use as a flag inside of set analsys.

My variable called 6_Month_Flag:

IF(MonthStart([Calendar date])= AddMonths( MonthStart($(Close_Date_Default)),-6) ,'Y','N')

But when im trying to use it inside of set analsys it just dont work

sum({$<(6_Month_Gap)={'Y'}>}Amount)

I tried so many way but none of them is working. 
What is the problem and how can i fix it?

Labels (1)
2 Replies
QFabian
Specialist III
Specialist III

Hi @Reuven12 , you have to use fields, not variables in that part of the set analysis.

So you can  create a field using the variable expresion, and then use it

You expression should look like this :

sum( {$< 6_Month_GapFIELD  = {'Y'} >} Amount)

QFabian
Reuven12
Contributor II
Contributor II
Author

Hey @QFabian ,

I  can't use a field because  the date change by user selection.

Thank you, Maayan.