Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
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 (1)
1 Solution

Accepted Solutions
Kalyan2
Contributor II
Contributor II
Author

I tried this and its working at both levels.

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

 

View solution in original post

1 Reply
Kalyan2
Contributor II
Contributor II
Author

I tried this and its working at both levels.

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