Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field 'Period' having YearMonth values like ex. 201312, 201311, 201310....etc
how to calculate 'Current Month -12', 'Current Month -1'(Previous Month)
Hi masters, can you please give a light on this?
Nuthan
First convert it into a Qlikiew date:
Date ( Date# ( [Period] , 'YYYYMM') )
Then use the AddMonths() function as needed, see the QlikView Desktop help for details.
Best Regards, Bill
May be like this?
=MonthName(AddMonths(Date#('201312', 'YYYYMM') ,-1)) // previous month
=MonthName(AddMonths(Date#('201312', 'YYYYMM') ,-12)) // current month -12
Note, Replace the date string with your YearMonth field.