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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ClearRide
Frequent Visitor

Need help with ranking category over dates by the sales

I have a table that is categorized by CAT and each CAT makes X sales per day. It looks like this: 

ClearRide_0-1663795491447.png

I want to rank them by the day (the rankings can change each day),
so I need it to look like this: 

ClearRide_1-1663795514764.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ClearRide , Try column or measure rank

 


New column Rank
Rankx(filter(Table, Table[Date] = earlier(Table[Date])), [Sales],,desc,dense)


New measure Rank
Rankx(filter(allselected(Table[Cat],Table[Date]), Table[Date] = Max(Table[Date])), calculate(Sum(Table[Sales])),,desc,dense)

 

Column Rank: https://www.youtube.com/watch?v=wDS_Vi4r9I4&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=39


Measure Rank: https://www.youtube.com/watch?v=DZb_6j6WuZ0&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=40

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@ClearRide , Try column or measure rank

 


New column Rank
Rankx(filter(Table, Table[Date] = earlier(Table[Date])), [Sales],,desc,dense)


New measure Rank
Rankx(filter(allselected(Table[Cat],Table[Date]), Table[Date] = Max(Table[Date])), calculate(Sum(Table[Sales])),,desc,dense)

 

Column Rank: https://www.youtube.com/watch?v=wDS_Vi4r9I4&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=39


Measure Rank: https://www.youtube.com/watch?v=DZb_6j6WuZ0&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=40

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.