Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've below 6 filters in my app
Year
Month
Quarter
Period
Business
Country
And I've below set analysis expression in a table to calculate 12 month rolling using the Period field.
sum({<Period={">=$(=Date(AddMonths(Max(Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max(Period))"}>}Sales).
So my requirement is if I make selection in Year, Month, Quarter, Period filters it should not effect the table. I tried below expression but it is not working.
sum({<Year=, Month=, Quarter=, Period=,Period={">=$(=Date(AddMonths(Max(Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max(Period))"}>}Sales)
Could you please help me on that.
Regards,
V
I believe you would need to add the ignore field into the Max expressions as well or just apply outer set analysis so it filters down in the entire measure.
{<Year=, Month=, Quarter=, Period=>}
sum({<Period={">=$(=Date(AddMonths(Max(Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max(Period))"}>}Sales)
I believe you would need to add the ignore field into the Max expressions as well or just apply outer set analysis so it filters down in the entire measure.
{<Year=, Month=, Quarter=, Period=>}
sum({<Period={">=$(=Date(AddMonths(Max(Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max(Period))"}>}Sales)
I tried with the expression which you recommended but it is still the same.
This expression is working, if we ignore fields inside max expressions.
sum({<Year=,Month=,Quarter=,Period=,Period={">=$(=Date(AddMonths(Max({<Year=,Month=,Quarter=,Period=,Period=>}Date#(Period, 'YYYYMM')), -11), 'YYYYMM')) <=$(=Max({<Year=,Month=,Quarter=,Period=,Period=>}Period))"}>}Sales)