Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to exclude some fields using set analysis with aggregation function
I am using below sample expression
Sum(Aggr(sum({$<A={'3'},B={'AP'}>}Total),dim))
I want to apply Aggr function only for B instead of both (A,B). Is it possible?
Not sure what you are after, but may be this
Sum({$<A={'<=$(=$(Var1))'},Year={'$(=$(Var2))', '$(=$(Var3))'}>}Aggr(sum({$<A={'<=$(=$(Var1))'},Year={'$(=$(Var2))'}>}Total)*(
(sum({$<A={'<=$(=$(Var1))'},Year={'$(=$(Var2))'}>}Cost)/sum({$<A={'<=$(=$(Var1))'},Year={'$(=$(Var2))'}>}Total))-
(sum({$<A={'<=$(=$(Var1))'},Year={'$(=$(Var3))'}>}Cost)/sum({$<A={'<=$(=$(Var1))'},Year={'$(=$(Var3))'}>}Total))),dim))
Great Sunny. I was stuck in the same since long. You made my day. Thank you very much for your help.
Sunny..One thing, I just want to know that what is the difference between both expression. Should we always use the expression (Which you told) in AGGR with set analysis or Is there any other logic behind it?
Well the outer aggregation should include the same set analysis that is needed for the inner one else the row wise number might match, but the total from the outer aggregation may filter out things....
Thanks for clarification sunny..