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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors