Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm using the below expression to get the Last day of Current Month for Last Year.
Expression: =AddYears(MonthEnd(Today(),0),-1)
Instead of 2/29/2016, it is giving me 2/28/2016.
Please help me on the same
Thanks
Satish
Well, technically, you calculate the last day in February 2017, which is 2/28/2016 and then subtract one year from that, and it gives you 2/28/2016.
Instead, try to subtract one year back from today() and then calculate the MonthEnd of that. That should give you the last day in February 2016:
MonthEnd(
AddYears(Today(),-1)
,0)
cheers,
Oleg Troyansky
Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Munich, Germany!
Well, technically, you calculate the last day in February 2017, which is 2/28/2016 and then subtract one year from that, and it gives you 2/28/2016.
Instead, try to subtract one year back from today() and then calculate the MonthEnd of that. That should give you the last day in February 2016:
MonthEnd(
AddYears(Today(),-1)
,0)
cheers,
Oleg Troyansky
Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Munich, Germany!
Silly mistake but costly..
Thanks for correcting me...