Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
DasKubus
Contributor
Contributor

Select Case or if statement to override particular values

My company recently moved to Qlik Sense. Due to some nuances in the data and an inability to capture past 'snapshots' I have 13 months of previous data that Qlik can't report accurately. I've been trying to set up a select case or if statement to the tune of 

Measure formula:

if( [CDate] = "Jan -2018" & [SProd] = "Thing1",  27,

if( [CDate] = "Jan -2018" & [SProd] = "Thing2",  27,

if( [CDate] = "Feb -2018" & [SProd] = "Thing1",  14,

if( [CDate] = "Feb -2018" & [SProd] = "Thing2",  9,

Count( [expression Qlik can use for current and future])

))))

Both select case and if statement attempts result in '-' across all data points and end up showing dates as far back as May-2017. The Count expression contains "[Cdate] = {'>=$(=Date(MonthStart(AddMonths(Now(), -13))))'}" so I should only get 13 months.

Is there a way to shoehorn data into the charts like this, plus have it drop off so I don't have to delete a line each month (next month I don't want to see 'Jan-2018')?

0 Replies