Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

date range

Hi,

I have the following, in my script.

DATE#(SUBFIELD(Calendar_Year_Month, ' ', 1)&' '&Calendar_Year,'MMM YYYY') as MONTH_YEAR,

then in Trigger, i have the following, works perfectly for the date range.

='>'&DATE(ADDMONTHS(Today(),-13),'MMM/YYYY') & '<='&DATE(ADDMONTHS(Today(),-1),'MMM/YYYY'error loading image)


Then, for the following

DATE#((capitalize(MONTH)&' '&YEAR),'MMM YYYY') as RollingTwelveMonthsAsOfMonthYear

It still works, but it's showing date instead of Month Year, and the date range is also wrong, it's always one month lesser.
how can i correct this like the above one just to show MMM YYYY ?

='>'&DATE#(ADDMONTHS(Today(),-13),'MMM/YYYY') & '<='&DATE#(ADDMONTHS(Today(),-1),'MMM/YYYY')

error loading image

Thanks,

1 Reply
Not applicable
Author

Well for the 2nd trigger you have date#( and the first one is date( so at first glance I would try changing that. You could also try to use dual and for the text paruse like...


dual(month(addmonths(today(),-13),'MMM/YYYY') & '/' & year(addmonths(today(),-13),'MMM/YYYY'), your expression here


I'm not what you mean by it's always 1 month lesser... if that's the case than use -12 instead of -13? I think I'm missing something for that part at least.