Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kalyan2
Contributor II
Contributor II

How to calculate rank in Pivot table

Hi All,

I need to calculate rank of company2 at Molecule , Category and country level in Pivot table.

I have only Molecule , Category and country in pivot table

only({<Company = {'Company2'}>}aggr(rank(Sum(Sales)), Molecule, Category, Country, Company)) this is working for Category level but not working as expected at molecule level.

how to get rank of Company2 sales at Molecule level also.

Please help me thanks in advance

Kalyan

Labels (2)
1 Solution

Accepted Solutions
Kalyan2
Contributor II
Contributor II
Author

if(dimensionality()=2,

only({<Company = {'Company2'}>}aggr(rank(Sum(Sales)), Molecule,  Country, Company)),

only({<Company = {'Company2'}>}aggr(rank(Sum(Sales)), Category, Country, Company))) 

using dimesionality() we can calculate ranks at different levels in pivot table 

View solution in original post

1 Reply
Kalyan2
Contributor II
Contributor II
Author

if(dimensionality()=2,

only({<Company = {'Company2'}>}aggr(rank(Sum(Sales)), Molecule,  Country, Company)),

only({<Company = {'Company2'}>}aggr(rank(Sum(Sales)), Category, Country, Company))) 

using dimesionality() we can calculate ranks at different levels in pivot table