Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

Add to Set Analysis a variable with an expression to ignore selections

VariableError.pngHi,

I would like to add to a Set Analysis expression a variable which holds a string for ignoring selections:

vIgnoreDates: Year=,Month=,Quarter=

Trying to create the variable in Sense with the above generates an error.

Tried the following syntax: 'Year=,Month=,Quarter='

but the selections are not ignored.

Any Idea how to use a variable for a part of a Set Analysis expression ?

Thanks!

Labels (3)
1 Solution

Accepted Solutions
dafnis14
Specialist
Specialist
Author

The solution is to set the variable in the script:

SET vIgnoreDates: = Year=,Month=,Quarter=;

View solution in original post

5 Replies
Anil_Babu_Samineni

First solution should work

vIgnoreDates: Year=,Month=,Quarter=

And expression would be Sum({<$(vIgnoreDates)>} Measure)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
dafnis14
Specialist
Specialist
Author

Hi,

Please see the error message I got for the variable definition..

What am I doing wrong?

Thanks!

 

VariableError.png

 

Anil_Babu_Samineni

That is qlik error as part of bug. Just ignore this and try in set analysis. Even in set analysis, you will get the error syntax. So simply ignore there and do apply and then check will see..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
dafnis14
Specialist
Specialist
Author

The thing is, unlike QlikView, you can't save a variable with a bad expression.

At least, I didn't succeed...

 

Thanks for trying to help 🙂

dafnis14
Specialist
Specialist
Author

The solution is to set the variable in the script:

SET vIgnoreDates: = Year=,Month=,Quarter=;