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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Michiel_QV_Fan
Specialist
Specialist

Applymap with variable in statement possible

Hi,

Created this:

Quarter_table:
MAPPING LOAD * INLINE [
Month, Quarter
Jan, Q1
Feb, Q1
Mrt, Q1
Apr, Q2
May, Q2
Jun, Q2
Jul, Q3
Aug, Q3
Sep, Q3
Oct, Q4
Nov, Q4
Dec, Q4];

and applied it here:

Treat:
NOCONCATENATE LOAD
*,
Month(DATE) as Treatment_month,
Year(DATE) as Treatment_year,
Date(DATE, 'DD-MM_YYYY') as Treatment_Date,
applymap('Quarter_table' , Month(DATE) , 'niks') as Treatment_Quarter
RESIDENT Treat_temp where Year(DATE) >=$($YearFrom);

where the month, year and date work correct but not the month in the applymap. I have no idea why. The applymap result is niks where it should be Q1 or Q2 ....

Please advise

Tnx

1 Solution

Accepted Solutions
Not applicable

Hi,

could it be that Month(Date) hold the numbers and not the text expression.

So you are trying to compare JAN with 1 as example?

Rainer

View solution in original post

2 Replies
Not applicable

Hi,

could it be that Month(Date) hold the numbers and not the text expression.

So you are trying to compare JAN with 1 as example?

Rainer

Michiel_QV_Fan
Specialist
Specialist
Author

Thanks!

You scored 100%!

Gift