Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

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)

Incurred Year Month (Analytical)Group IDGroup CountRevenue Impact
2600
20130170001-446,290
20130110051-97,003
20130130921-23,549
20130110341-17,745
20130160561-15,883
20130117971-15,660
20130115511-8,633
20130190551-7,730
20130131321-4,344
20130111031-3,901

Incurred Year Month (Analytical)Group CountRevenue Impact
2600
2013012600
0 Replies