Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In my application there is a field name called MAX_MONTH_YEAR.It is in format MAY-2022.The data is given up to May month.
When user opens application it must automatically show the previous month
In backend I wrote script for that field as Date(Floor([MOVE_DATE]), 'MMM-YYYY') as MAX_MONTH_YEAR
I tried using expression in KPI as Max(Month(MONTH_YEAR))-1. But it's not working
Please help me out
Thank you
If your [MOVE_DATE] is in this format DD/MM/YYYY then use the below expression in back end for month year calculation
Date(Date#(Date,'DD/MM/YYYY'),'MMM-YYYY') as MonthYear
Then write this in KPI to get the previous month according to your requirement-
Date(Addmonths(Date#(Max(MonthYear),'MMM-YYYY'),-1),'MMM')
or
Date(Addmonths(Date#(Max(MonthYear),'MMM-YYYY'),-1),'MMM-YYYY')