Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
KevinJ
Contributor III
Contributor III

RANK SET ANALYSIS

I need to show the top 10 using rank with a set analysis. I just need it to focus on the item type : inventory Item.

Goal : 

1. Rank show only top 10. Rank by Subtotal

2. Colums : Item Name, Subtotal, Total Unique Purchase Orders.

KevinJ_0-1704228101968.png

Item Name Subtotal PO Item Type
Product 1 500 1 Inventory Item
Product 2 250   Service
Product 1 500 1 Inventory Item
Product 2 250 2 Inventory Item
Product 2 250 1 Inventory Item
       
       
Output:      
Rank  Item Name TOTAL PO Total
1 Product 1 2 1000
2 Product 2 3 500
Labels (2)
1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like below

MayilVahanan_0-1704247200442.png

 

If rank is based on item Name, then in Aggr function, instead of subtotal, try like below

=Aggr(Rank(Sum(Subtotal)), [Item Name])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
MayilVahanan

Hi

Try like below

MayilVahanan_0-1704247200442.png

 

If rank is based on item Name, then in Aggr function, instead of subtotal, try like below

=Aggr(Rank(Sum(Subtotal)), [Item Name])

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
KevinJ
Contributor III
Contributor III
Author

I forgot to include the ranking would also be a set analysis of Currency = PHP, and Item Type Inventory Item. How would that be possible? 

 

Item Name Subtotal PO Currency Item Type
Product 1 500 1 PHP Inventory Item
Product 2 250   EUR Service
Product 1 500 1 PHP Inventory Item
Product 2 250 2 EUR Inventory Item
Product 2 250 1 EUR Inventory Item
Product 1 5000 2 EUR Inventory Item
         
Output:        
Rank  Item Name TOTAL PO Total  
1 Product 1 2 1000  
2 Product 2 3 500  

 

KevinJ
Contributor III
Contributor III
Author

I forgot to include the ranking would also be a set analysis of Currency = PHP, and Item Type Inventory Item. How would that be possible? 

 

Item Name Subtotal PO Currency Item Type
Product 1 500 1 PHP Inventory Item
Product 2 250   EUR Service
Product 1 500 1 PHP Inventory Item
Product 2 250 2 EUR Inventory Item
Product 2 250 1 EUR Inventory Item
Product 1 5000 2 EUR Inventory Item
         
Output:        
Rank  Item Name TOTAL PO Total  
1 Product 1 2 1000  
2 Product 2 3 500