Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I would like to know if it is possible to automatically calculate last 6 months based on my selected month:
For example if i choose Jan 2016
How can I get make my graph automatically to show:
janv-2016
Dec-2015
Nov-2015
Oct-2015
Sept-2015
Aug-2015
Any idea?
Many Thanks,
Hasvine
YOu can also check for various similar expressions from below link
Set Analysis for Rolling Periods
Regards,
Jagan.
The problem is that if i choose the month 10 for example it gives me the months 5 to 12.
It does not stop at the month 10. 😞
See this example:
It doesnt help in my situation unfortunately.
Thanks,
Hasvine
Is this you need?
I would load like this to correctly handle data that spans over more than one year:
SalesData:
LOAD
Date(MakeDate(Year, Month), 'MM-YYYY') as Month,
Year*12 + Month as MonthSequence,
Year,
Amount
inline [
Year, Month, Amount
2015,8,7
2015,9,8
2015,10,6
2015,11,9
2015,12,7
2016,1,6
2016,2,4
2016,3,7
2016,4,3
2016,5,4
2016,6,9
2016,7,5
2016,8,7
2016,9,8
2016,10,6
2016,11,9
2016,12,7
];
And use the expression:
Sum({<MonthSequence = {">$(=Max(MonthSequence)-6)<=$(=Max(MonthSequence))"}, Month, Year>} Amount)
Sorry, if you need 6 month, change in the formula 5 for 6
I need the first table.
Can you please explain how you did it.
Many Thanks,
Hasvine
OK,
in dimension are Month and in the expression put this:
Sum({<Month={'>=$(=Max(Month)-6)<$(=Max(Month))'}>}Amount)
check the updated expression :
Sum({<Month={'>=$(=Max(Month)-5)<$(=Max(Month))'}>}Amount)