Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want last two months in dimension in povit table
please guide me
this is my data
Set analysis is the solution
Sum({<Factoryship_Moonth = {">=$(=Max(Factoryship_Moonth-1)) <=$(=Max(Factoryship_Moonth))"}>} Measure)
I want the calculated condition in dimension not in expression
Perhaps this?
If(Factoryship_Moonth >= AddMonths(Max(TOTAL Factoryship_Moonth), -1) and Factoryship_Moonth <= Max(TOTAL Factoryship_Moonth), Factoryship_Moonth)
can't you create a the dimension in script? you can set a variable "max month" and then create the dimension by comparing the month field with "max month" and "max month -1". if true it assigns the month field value, null() otherwise
I think this should be enough
If(Factoryship_Moonth >= AddMonths(Max(TOTAL Factoryship_Moonth), -1), Factoryship_Moonth)
But I wonder why the OP doesn't want to use set analysis?