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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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
MVP
MVP

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)

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.
Reuven12
Contributor II
Contributor II
Author

Hey @QFabian ,

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

Thank you, Maayan.