Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I would like your help on how to show a YearMonth trend...
I have a field 'YearMonth' (shown like '201303', '201302'....) and an expression sum(Total_Sales), I would like to let the ability to
show a trend chart for the last 12 months when the user chooses YearMonth.
For example, I the user chooses 201303 than the chart should show the numbers starting from 201204...to 201303.
I'll appreciate your advice on this.
Best regards,
David
sum({<YearMonth={">$(=Date(Addmonths(Max(YearMonth),-12),'YYYYMM'))<=$(=DAte(Addmonth(Max(YearMonth),0),'YYYYMM'))"}>}Sales)
sum({<YearMonth={">$(=Date(Addmonths(Max(YearMonth),-12),'YYYYMM'))<=$(=DAte(Addmonth(Max(YearMonth),0),'YYYYMM'))"}>}Sales)
Hi,
Do you have datefield in number format?
if so you can use like
Sum({<YearMonth=,DateFieldNum={">=Floor(MonthStart(Max(DateFieldNum), -11))<=Floor(MonthEnd(Max(DateFieldNum)))"}>} Sales)
if you Year and Month fields exclude that also.
Thanks...works ok.