Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
Below expression is not showing rolling period, can some one pls suggest.
Sum(Aggr(If(Sum({<%YearMonthID={'>=$(=max(%CurrentYearMonthID)-2)<=$(=max(%CurrentYearMonthID))'}>} ED) -
Sum({<%YearMonthID={'>=$(=max(%CurrentYearMonthID)-2)<=$(=max(%CurrentYearMonthID))'}>} COLL_AMOUNT)>0,
Sum({<%YearMonthID={'>=$(=max(%CurrentYearMonthID)-2)<=$(=max(%CurrentYearMonthID))'}>} ED) -
Sum({<%YearMonthID={'>=$(=max(%CurrentYearMonthID)-2)<=$(=max(%CurrentYearMonthID))'}>} COLL_AMOUNT)),
LEV_NETTING_18))
-Priya
What is it doing? Giving error or the numbers are not right? Would you be able to share a sample of what you have and also provide some information as to what you are looking to get?
Hi Priya, try adding the same set analysis to the outside Sum():
Sum({<%YearMonthID={'>=$(=max(%CurrentYearMonthID)-2)<=$(=max(%CurrentYearMonthID))'}>}
Aggr(If(Sum({<%YearMonthID={'>=$(=max(%CurrentYearMonthID)-2)<=$(=max(%CurrentYearMonthID))'}>} ED) -
Sum({<%YearMonthID={'>=$(=max(%CurrentYearMonthID)-2)<=$(=max(%CurrentYearMonthID))'}>} COLL_AMOUNT)>0,
Sum({<%YearMonthID={'>=$(=max(%CurrentYearMonthID)-2)<=$(=max(%CurrentYearMonthID))'}>} ED) -
Sum({<%YearMonthID={'>=$(=max(%CurrentYearMonthID)-2)<=$(=max(%CurrentYearMonthID))'}>} COLL_AMOUNT)),
LEV_NETTING_18))
It is not showing any error, but it showing all months instead of 3
values are wrong if use this
Is your field %YearMonthID correctly associated with your measure and dimensions? Also, %YearMonthID is formated as a number? Would you be able to share a screenshot of %YearMonthID field?
all are good, Yearmonth id is like 24202,24201
Can you check if this gives you the right range in a text box object?
='>=' & (Max(%CurrentYearMonthID)-2) & '<=' & Max(%CurrentYearMonthID)
yeah it is good, like it showing - 24200<=24202
Then I don't really know what the issue might be. May be if you can share a sample, I might be able to look into that