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

How can I calculate volume of Top n brands in Table?

Hi,

I struggle for the last 2 days with this problem but I can't figure it out. I want to have a table which gives out volumes by 2 Dimensions (Number and NewKey) and adds up the Top 4 by brand. I tried various combinations of rank and aggr function with sum without success. To show better what I want to achieve, please check out the picture...

Capture.JPG

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

=Sum( Aggr( if( Rank(Sum(Value)) <=4, Sum(Value)), Number, NewKey, Brand))

View solution in original post

3 Replies
MK_QSL
MVP
MVP

It would be better if you provide sample data or sample application along with the result in excel.

swuehl
MVP
MVP

Maybe like

=Sum( Aggr( if( Rank(Sum(Value)) <=4, Sum(Value)), Number, NewKey, Brand))

Not applicable
Author

Thanks swuehl, you are spot on! I tried a lot of different nested functions, but not this combination.