Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have written the below formula :
If(Sum(Consumption) <> 0,Only({<MonthYear={">=$(=Date(AddMonths(Max(MonthYear), -96)))<=$(=Date(Max(MonthYear)))"}>} Aggr(
RangeSum(Above(Sum({<MonthYear={">=$(=Date(AddMonths(Max(MonthYear), -96)))<=$(=Date(Max(MonthYear)))"}
>} Consumption), 0, Month(Only({<MonthYear={">=$(=Date(AddMonths(Max(MonthYear), -96)))<=$(=Date(Max(MonthYear)))"}>} Month))))
, cat, (MonthYear, (NUMERIC)))))
But every time i don't want to change that 96(those many months(7 years) i have). Because next month i have to change to 97 then next month 98...
I don't want it to be hard coding.
Can you please help me how it to be automated.
Please let me know if you need anything more.
Thanks,
Bharat
It is version problem Sunny Bhai...If i put it as numeric in QV12 it works fine..We will be getting in ascending order.. This also you had only taught me. Please let me know anything if you need. Please see the below image:
Try this
Sum({<MonthYear={">=$(=Date(Min(MonthYear)))<=$(=Date(Max(MonthYear)))"}, Consumption = {"*"}>} Aggr(RangeSum(Above(Sum({<MonthYear>} IB), 0, Month(Only({<MonthYear>} Month)))), cat, (MonthYear, (NUMERIC))))/ Sum(TOTAL <[Month-Year]>{<MonthYear={">=$(=Date(Min(MonthYear)))<=$(=Date(Max(MonthYear)))"}, Consumption = {"*"}>} Aggr(RangeSum(Above(Sum({<MonthYear>} IB), 0, Month(Only({<MonthYear>} Month)))), cat, (MonthYear, (NUMERIC))))
I will check again and take some time to analyze the expression. I will work on it Sunny Bhai... Thanks a lot again and again...If i get any queries i will let you know .. Thank you so much...........Really thanks Sunny Bhai..