Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all!
Today I faced a problem:
Set Analysis Doesn't work, when i use Aggr function in Sum function.
Example:
=Sum({<Year={2016}>} Aggr(Budget,Segment,Region, MonthYear))
(budget loaded only on 2016)
Looks like:
Without Year Selection - ok result "3618810433,6481" (dada loaded only on 2016)
With selected Year=2016 - ok - result "3618810433,6481"
But if we select other Year (2015 for example)
We will get "0" as result.. It means, that our Set in function Sum({<Year={2016}>} Aggr(.. doesn't work. The result must be "3618810433,6481"
Help me somebody.. Why [Set Analysis Doesn't work / Aggr in Sum]?
Try this:
=Sum({<Year={2016}>} Aggr(Only({<Year = {2016}>}Budget),Segment,Region, MonthYear))
Try this:
=Sum({<Year={2016}>} Aggr(Only({<Year = {2016}>}Budget),Segment,Region, MonthYear))
Instead of Only, it might be better to use nested sum. That way Aggr will do a row reduction and improve expression performance