Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I'm trying to show the trending for Month in BAR chart. Usually when we select the month from the list box, it will show the particular selected month data only.
My requirement is when I select the Month from the list box, It should show the previous 5 months data along wit current month.
For example If i select the Month-Year as April 2016 then the bar chart should display the trending for April 2016, March2016, Feb2016, Jan 2016, Dec2015, Nov 2015.
Please help.
Thanks,
Rajitha
I guess, something like this:
If([Month-Year] <= Max(TOTAL [Month-Year]) and
[Month-Year] >= AddMonths(Max(TOTAL [Month-Year]), -5), [Month-Year])
But make sure to ignore selection in [Month-Year] field in your expression. Assuming you have Sum(Sales) as your expression, change it to -> Sum({<[Month-Year]>} Sales)
May be using set analysis:
{<[Month-Year] = {"$(='>=' & Date(AddMonths(Max([Month-Year]), -5), 'MMM YYYY') & '<=' & Date(AddMonths(Max([Month-Year]), 0), 'MMM YYYY'))"}>}
Now I am not sure how you create Month-Year in script, but why is some months complete name (March) vs. others have short month name (Feb)?
Sorry all the months have the same format MMM/YY. I'm trying to write this in Calculated Dimension. Is this possible. Please advise?
I guess, something like this:
If([Month-Year] <= Max(TOTAL [Month-Year]) and
[Month-Year] >= AddMonths(Max(TOTAL [Month-Year]), -5), [Month-Year])
But make sure to ignore selection in [Month-Year] field in your expression. Assuming you have Sum(Sales) as your expression, change it to -> Sum({<[Month-Year]>} Sales)