Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum with aggr or total?

Hi all!

I have a table similar below, where I need count people in groups A and in subgroups A1. In the sum for A1 the expression that Im use is:  sum(Ind_Ative) and this WORKS OK. But in the sum for a group A, I need that total for a group is repeated in all lines for the group. Im use the expression: sum(aggr ( sum(Ind_Ative), Group_A))

But the result is like below, where the value just appear in one lines.

Any idea?

Thanks!

Group AGroup A1Ind_Active for group A1Ins_Active  for Group A
23100
1291590590
1661117205
1662160
166420
1666700
200121470
2002192363
2004780
20051160
200600
200820
200910
2001000
2011619
201230
2013100
6 Replies
maxgro
MVP
MVP

maybe

sum ( total <Group_A> Ind_active)

Not applicable
Author

I tryed this but not worked because the total was global for all groups.

maxgro
MVP
MVP

can you post a small .qvw?

Not applicable
Author

In fact, this sum ( total <Group_A> Ind_active)
should work, I tested in the simple example. But in my applicattion that be very most hard this does not wok...still the group A and subgroup are in the same table.

The result is the total sum for all groups.
Any idea?

erjohnso
Creator
Creator

Try

sum({<Group A1=>} total <Group A> Ind_active)

stabben23
Partner - Master
Partner - Master

Hi, Use th NODISTINCT in your expression:

sum( aggr (NODISTINCT sum( [Ind_Active for group A1]),[Group A]))