Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have extracted the data for the last 12 months and now need to do month on month analysis.
If a user selects lets say May 2017, I need to show the data for May and difference from April, ie May - April.
So do I use GetFieldSelections and then use Addmonths(month, -1)?
In another table I need to show a trend as well, so to sort the data from last month to the current month, how would I sort it?
thanks.
May be this?
For May
Sum({<MonthName = {'$(=Max(MonthName))'}>} Sales)
For May - April
Sum({<MonthName = {'$(=Max(MonthName))'}>} Sales) -
Sum({<MonthName = {'$(=AddMonths(Max(MonthName),-1))'}>} Sales)
Try this,
Sum({<MonthName = {"$(=Max(MonthName))"}>} Sales) -
Sum({<MonthName = {"$(=AddMonths(Max(MonthName),-1))}>} Sales)
Regards,
Pratik
Thanks for your reply. Shouldnt the months be ordered?
Means
If I have months from May 17 to Apr 16, I cant use the month numbers as then december would be 12 and I will get the max as December. How would I manage the order of the months
5,4,3,2,1,12,11,10,9,8,7,6
Would I have to create an inline table to define this order. If so wouldnt I have to manually change it for each month?
If you use MonthNum / MonthName as Dimension and expression where i gave you can use and check..
thanks Anil. Testing it, will let you know.