Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i had a field reportmonth which has value like 2018-01,2018-02.
It is in text value .
i want to show use this as as dimension as chart. but in dimension i want to show only last 13 months date.
Can any one suggest me what to do ....it seems my logic is not working
Kind Regards
The first step is to get proper dates from the text string - in the load script, when you load reportmonth, replace reportmonth with the line:
LOAD ... Date#(reportmonth, 'yyyy-MM') as reportmonth,
Now you can use all the Date functions. For 13 months, you could use the set expression like this:
Sum({<reportmonth = {">=$(=Date(Addmonths(Max(reportmonth), -12),'yyyy-MM')) <=$(=Date(Max(reportmonth),'yyyy-MM'))"}> amount)
Adjust the expression to suit your requirements.
Hi Jontydkpi,
Thanks for reply.
Can you please tell me how to limit the last 13 months as calaculated dimension ,it can be a great help