Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF Statement within Set Analysis

I have this expression:

num(sum({<Year={$(=Only(Year))}, Qtr_Num={2}, [Budget/Actual]={Actual}>} GWP/1000), '#,##0'),

I have that for different columns for the different quarters.  I'd like it to include an if statement where is says IF the Qtr_Num above is less than or equal to the Qtr-Num selected [Budget/Actual]={Actual}, else [Budget/Actual]={Budget}.

Any help would be appreciated.

1 Reply
Not applicable
Author

Hi, the easiest way would be to have the IF outside the Set Analysis and have two num() statements. Alternatively you could have the {Actual} / {Budget} replaced with a variable which contains an Dollar-sign expansions which could be you IF statement resulting in either the text of 'Budget' or 'Actual'.  Hope that makes sense