Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
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)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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..

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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=;

View solution in original post