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: 
wanyunyang
Creator III
Creator III

Continuous rank

Hi guys,

I have a table like this:

Customer, Item, Sales

A, aaa, 5

A, bbb, 5

A, ccc, 2

...

 

I want to rank the sales by customer and item, and this is the function I use:

aggr(rank(Sales),Customer,Item)

 

The results end up like:

Customer, Item, Sales, Rank

A, aaa, 5,  1

A, bbb, 5, 1

A, ccc, 2, 3

...

 

I wonder if it's possible for the third row to have Rank=2?

2 Replies
Vegar
MVP
MVP

This might solve your problem

=aggr(NODISTINCT rank(sum(Sales)), Sales)

Vegar_0-1611850829012.png

 

Ksrinivasan
Specialist
Specialist

hi,

try this

=aggr(rank(sum(Sales)), Customer, Item)

ksrinivasan