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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Does anyone know why subsetting a created variable doesn't work?

Hey Guys ,

Im struggling to subset a dimension, any thoughts or ideas?

[SC]:

Load

[RESPID],

// [PID],

[WGT],

Month,

[Location],

[Age],

// [Occupation],

// [Industry],

[Employment],

[Household v1],

[HH Income],

// [Education],

[Quarter]

From [lib://A (qlik1)/SC.xlsx]

(ooxml, embedded labels, table is [SC]);

FOR vMonth = 0 to 11

MATMonthYear:

LOAD

[Month],

Date(AddMonths([Month], $(vMonth)),'$(vMonthFormat)') as [MATMonthYear]

RESIDENT SC

WHERE AddMonths([Month], $(vMonth)) < '43222'

;

next


I want to create a subset of the dimension MATMonthYear by doing the following:

Load

if(Match([MATMonthYear],'May-2010','May-2011','May-2012','May-2013','May-2014','May-2015','May-2016','May-2017','May-2018'),[MATMonthYear],null()) as Yeartodate;

but i keep getting an error saying it doesnt exist.


Thanks,

David

0 Replies