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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Clarification

Hello Friends,

Date(MonthName(Period-14,+1),'YYYYMM') as [Trans Period]

I am not able understand the above line, could you please explain me, what is it mean of -14.

Regards

Chriss

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Period seems to be a date field. Period-14 is then 14 days earlier than the value of Period (i.e. two weeks earlier). Monthname returns the first day of the month of the date, in this case of Period-14. The second parameter 1 is an offset, so it doesn't return the month of Period-14, but a month later. Then this date is formatted using the Date function so it displays in YYYYMM format (e.g. 201204).


talk is cheap, supply exceeds demand
Not applicable
Author

Hello Gysbert,

thanks a lot for your explnation.