
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
