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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
reendzz98
Helper I
Helper I

Displaying category on rank = 2 only based on sales by categories

Hi everyone,

 

I'm having a problem to display category which rank = 2

 

Below is the table that I currently have in my report.

 

reendzz98_0-1673235950512.png

 

For the ranking table, I currently using the measure below:

 

var a = max(smart_revenue[Year])

return
RANKX( ALLSELECTED(car[car_name]), CALCULATE(SUM(car_sales[sales1]) + SUM(car_sales[sales2]),smart_revenue[Year]=a))

Credit to: @Adam_Shelton for helping me out to create this measure.

 

I want to create a measure which a scorecard can display car DEF only. Any tips?

1 ACCEPTED SOLUTION
Adam_Shelton
Frequent Visitor

Well, there are 2 ways you can try:

1. Using filter on this visual: you can create a visual and apply filter rank = 2

Adam_Shelton_0-1673237378789.png

2. Create another DAX: calculate Sales with condition rank measure = 2

View solution in original post

2 REPLIES 2
Adam_Shelton
Frequent Visitor

Well, there are 2 ways you can try:

1. Using filter on this visual: you can create a visual and apply filter rank = 2

Adam_Shelton_0-1673237378789.png

2. Create another DAX: calculate Sales with condition rank measure = 2

amitchandak
Super User
Super User

@reendzz98 , I think the newly released Index function should be a better option

newly released Dax Function Offset, Window, Index: https://youtu.be/KhkCALjHylE

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.