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

Sum Numbers aggregated by max Sn, Country, City.

Hi all,
OK, I give up 😞 .How to write the expression to sum "Number" field values aggregated by the last "Sn", "Country" and "City" fields.

The result should be  9 (2+1+2+4 )

SnCountryCityNumber
1SpainMadrid1
2SpainMadrid2
3GermanyBerlin0
4FranceParis3
5GermanyBerlin1
6PolandWarsaw2
7PolandWarsaw2
8FranceParis4


Thank you in advance

Labels (1)
1 Solution

Accepted Solutions
Taoufiq_Zarra

Hi,

Maye be :

=Sum(Aggr(FirstSortedValue(Number, -Sn), Country,City))

 

Capture.PNG

 

and DON'T GIVE UP 😜

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

Hi,

Maye be :

=Sum(Aggr(FirstSortedValue(Number, -Sn), Country,City))

 

Capture.PNG

 

and DON'T GIVE UP 😜

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Rizzo
Contributor II
Contributor II
Author

That woks! Thank you Taoufiq ZARRA 🙂