Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

To Calculate Sum of Rows with aggregated expression

I want to calculate the Total sum by Región of [PDM X Región 2] Field

I have this:

[PDM x Región 2] = [PDM x Cemento] * [Volumen %]

And I want to get the total sum = 2.47

aggregation.PNG

My [PDM x Región 2] Expression is: [PDM X Cemento]* Sum(Volumen)/Sum( DISTINCT TOTAL <Región> Volumen)

I've tried using the sum(aggr(sum [PDM x Región 2] , Región, Gerencia)) and doesn't work

Can anyone help me, please

Thanks a lot

BR

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Hi BR,

if [PDM X Cemento] is a field name, try

sum(aggr( [PDM X Cemento]* Sum(Volumen)/Sum( DISTINCT TOTAL <Región> Volumen), Región, Gerencia))


View solution in original post

2 Replies
swuehl
MVP
MVP

Hi BR,

if [PDM X Cemento] is a field name, try

sum(aggr( [PDM X Cemento]* Sum(Volumen)/Sum( DISTINCT TOTAL <Región> Volumen), Región, Gerencia))


Not applicable
Author

You R a Genius!!! Thanx