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: 
aminehaddar
Contributor II
Contributor II

problem with aggregation

Hello,

I have this table:

Agence, SEGMENT, SOUS_SEGMENT as dimensions.

The aim of this, is to got an aggr by agence, to have the measure 'poids'=100% for every agence,

or when I don't use filters like the first picture, I got wrong % ,

or when I select one agence, like the second picture, I got the right numbers.

 

My question: what to change to get the numbers like the second picture for every agence.

I used: 

sum(ENCOURS_PLACEMENT_HIST) for encours_placement_hist

aggr(sum(ENCOURS_PLACEMENT),AGENCE,SEGMENT,SOUS_SEGMENT)
/
aggr(sum(total ENCOURS_PLACEMENT),AGENCE,SEGMENT,SOUS_SEGMENT)   for 'poids'

 

So, I need to correct the poids column and for each agence, I got 100% as total

 

1.PNG

2.PNG

 

Regards

Labels (2)
1 Solution

Accepted Solutions
albert_guito
Creator II
Creator II

Hi,

You only need to qualifier the TOTAL with AGENCE dimension

Sum(ENCOURS_PLACEMENT)/Sum(TOTAL <AGENCE> ENCOURS_PLACEMENT)
Ag+

View solution in original post

1 Reply
albert_guito
Creator II
Creator II

Hi,

You only need to qualifier the TOTAL with AGENCE dimension

Sum(ENCOURS_PLACEMENT)/Sum(TOTAL <AGENCE> ENCOURS_PLACEMENT)
Ag+