Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to know how to make a bar chart display the past 12 months (including the months selected). How can that be done?
Try this expression Sum({<Date={">=$(=AddMonths(Max(Date),-12)) <=$(=Max(Date)) "}>} Value) with Month as dimension.
Hi Amit,
You can achieve the Rolling months chart by using addmonths function. Define a variable which holds the current day. And equal another variable for last 12 months. By calling you date field to match this variable you can achieve the same.
-Jay
What is Date in this expression?
Date may be calendar date or financial date, as you've created the calendar in your application.
Amit,
See the attachment.
Thanks,
AS
try like this
sum({<monthid={">=$(=max(monthid)-11) <=$(=max(monthid))"},year=,quarter=,month=>}sales}
or
sum(aggr(rangesum(above(totalsum({<month=>}amount),0,12)),month))
Use accumulation option provided in Charts
Hi,
Try this
Sum({<DATE={">=$(=MonthStart(Max(DATE),-12)) <=$(=MonthEnd(Max(DATE)))"}>} SALES)
Regards
ASHFAQ