Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data like below
Country , Sales, Growth
A,100,12
B,200,23
C,200,34
i my case i need to show only top 2 if i use sales it is showing both B&C i need to show only C because this case i need to rank on growth
if rank Repeat i need to choose max Growth
is it possible
Not 100% sure what you are looking for but possibly something like this?
=Rank(RangeSum(Sum(Sales), Sum(Growth)))
Hi Channa,
Try this, it will give the right combination. I've added an example (D).
//Example code
Table:
Load * Inline [
Country , Sales, Growth
A,100,12
B,200,23
C,200,34
D,300,34
];
// Get the ones with the highest Growth if the sales are the same.
Left Join (Table)
Load
Country,
1 as _indRank
;
Load
Sales,
FirstSortedValue(Country,- Growth) as Country,
Max(Growth) as MaxGrowth
Resident Table
Group by Sales desc
;
// Get all the ranked and rank them ordered by sales
FinalTable:
Load
*,
RowNo() as Rank
Resident Table
Where _indRank = 1
Order by Sales desc
;
// Add all the ones that are not ranked
Concatenate(FinalTable)
Load
*
Resident Table
Where IsNull(_indRank)
Order by Sales
;
Drop table Table;
Jordy
Climber