Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
harveenkaur
Contributor III
Contributor III

Count according to rank

I have the following data which shows sales and growth for 3 products with respect to different cities. I need to find the count of cities in which product A is number 1 (according to growth) with respect to other products.

 

** Growth has been calculated separately  by using formula (Current Year Sales-Previous Year Sale)*100/Previous Year Sales.

CityProduct A SalesProduct A Growth Product B SalesProduct B GrowthProduct C SalesProduct C Growth
A1752748619340114668361
A2126887881575456119640640
A312604373645738613170770
A412006649539359716366318
A5215567591086088915006100
A621691883110127917452359

 

I want to show output in sepearate KPI .

Output should be like:-

No. of cities in which Product A is no. 1:- 2

No. of cities in which Product B is no. 1:- 3

No. of cities in which Product C is no. 1:- 1

please suggest any appropriate approach.

Labels (1)
8 Replies
Kushal_Chawda

Based on above data what should be the expected output? Where you want to show that?

harveenkaur
Contributor III
Contributor III
Author

I want to show output in sepearate KPI .

Output should be like:-

No. of cities in which Product A is no. 1:- 2

No. of cities in which Product B is no. 1:- 3

No. of cities in which Product C is no. 1:- 1

Kushal_Chawda

what is the definition of No 1 product? Based on Growth, how you are counting cities 2 product A?

sunny_talwar

Do you have multiple columns for Product (Product A, Product B, etc) or do you have a single Product column which contains values as Product A, Product B,... etc?

harveenkaur
Contributor III
Contributor III
Author

 Multiple columns for Product

harveenkaur
Contributor III
Contributor III
Author

No. 1 means the cities where growth is maximum for product A(w.r.t to product B and product C)

sunny_talwar

Can you transform your data using The Crosstable Load so that you have a single column for Products?

Kushal_Chawda

Please provide some sample data to work with