Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created a variable in the load script as Follow;
Let vForecastDate = $(vMaxDate)+ 5;
My vMaxDate = Oct-2020, and the expected answer is Nov-2020, Dec-2020, Jan-2021, Feb-2021. But I am getting the answer as 44106, 44107,44018.
I tried several options to convert the above variable into MonthName, but it does not work,
Please advise on the above.
Dates are stored internally as number of Days. So "+5" advances the date by 5 days, not 5 months. You can see the formatted date value by wrapping a Date() function around your expression:
Date($(vMaxDate)+ 5)
What you want is the AddMonths() function:
AddMonths($(vMaxDate), 5)
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
Dates are stored internally as number of Days. So "+5" advances the date by 5 days, not 5 months. You can see the formatted date value by wrapping a Date() function around your expression:
Date($(vMaxDate)+ 5)
What you want is the AddMonths() function:
AddMonths($(vMaxDate), 5)
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
Hi Rob,
Thanks for the solution, it is working perfectly.
Thanks Again.