Aggregation and Set Analysis - summing and counting
I am trying to aggragate based on a condition in two expressions. It works fine when I do it with the group dimension for both expressions but only the Group Count dimension works when I take out the Group Id dimension (below). I know the expressions are different but I want the Revenue Impact expression to aggragate (and work like) the Group Count expression. The expressions:
Group Count:
count(if(aggr(($(vBenFactorCur)/$(vMemberCntCur)) - ($(vBenFactorPrev)/$(vMemberCntPrev)),[Group ID],[Incurred Year Month (Analytical)])<.0, [Group ID]))
Revenue Impact:
if(aggr(($(vBenFactorCur)/$(vMemberCntCur)) - ($(vBenFactorPrev)/$(vMemberCntPrev)),[Group ID],[Incurred Year Month (Analytical)])<-0, sum({<[Incurred Year Month Type]={'Current'}>}[PMPM Premium])-sum({<[Incurred Year Month Type]={'Previous'}>}[PMPM Premium]),0)