Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Rosh_2893
Contributor
Contributor

To Display Rank of a product in KPI

Hi All,

I have a table with Country, products, sales% of Products and Rank of each product based on sales and country.

Country Product Sales % Rank
XX ABC 0.60% 34
YY EFG 0.40% 49
ZZ HIJ 0.30% 54

 

I want to display the Rank of particular Product "EFG" in a KPI. I am using the same formula in KPI as used in table. But I always get Rank value as 1 in KPI (I think it is comparing against the same product hence 1). I want to display the actual Rank which is 49 in KPI as in the table.

I am calculating the Sales% as :

vSales = num(SUM({$<[MonthYear] = {'$(vCurrentMonth)'}, Product >} $(=[Sales]))
/
SUM(TOTAL {$<[MonthYear] = {'$(vCurrentMonth)'}, Product >} $(=[Sales])),'0,0000%')

I am calculating the Rank as :  

RANK = Aggr(Rank($(vSales),4,1),Country,Product)

Any suggestions on this.

Thanks in Advance 

 

Labels (1)
0 Replies