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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
MZqlik
Contributor III
Contributor III

Basics State of Set Analysis

Hi Everyone,
I don't understand why, on the below set analysis, when I select different filters in my sheet the total sum of this KPI changes.

Would it not suppose to be fixed as I have added a 1 in front?

Sum({1<
PERIOD ={'$(vCurrentPeriod)'},IN_BUDGET = {'Y'},TYPE = {'ACTUAL'}
>} SAVINGS)/1000000

Where I have gone wrong? 

thank you

Labels (3)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Yes you need to handle your variable. VMaxDate can change when you make a selection. A full set {1} in your variable expression will help you.

 =DATE(MAX({1<TYPE = {'ACTUAL'},SAVINGS = {">0"}>}REC_EFF_DT))

View solution in original post

4 Replies
Vegar
MVP
MVP

You should expect it to be a fixed result IF all your set modifiers are fixed. 

One of your modifier values are defined by a variable. What is the content of that variable? Is it an expression that is affected by the selections you do in your data model?

MZqlik
Contributor III
Contributor III
Author

that variable contains: =ONLY({<
TYPE = {'ACTUAL'},
SAVINGS = {">0"},
REC_EFF_DT = {'$(vMaxDate)'}
>}PERIOD)

and VMaxDate is: =DATE(MAX({<
TYPE = {'ACTUAL'},
SAVINGS = {">0"}
>}REC_EFF_DT))

Would I need to add a 1 in front of the variables set analysis? 

 

Vegar
MVP
MVP

Yes you need to handle your variable. VMaxDate can change when you make a selection. A full set {1} in your variable expression will help you.

 =DATE(MAX({1<TYPE = {'ACTUAL'},SAVINGS = {">0"}>}REC_EFF_DT))

MZqlik
Contributor III
Contributor III
Author

cheers yeah I did try that earlier and it works. I didn't consider variables could play a role into it! 🙂