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
RAHUL18
Frequent Visitor

How to give rank to sub category ignoring primary category. (need to highlight top 3 from month)

How to highlight top 3 from matrix visual. I used rankx function but it give ranking seperate for each category and sub category.

I want higlight top 3 from overall sub category. please see the attached imaged to clarify more. In image each month show top 3 values highlighted in cololur from overall subcategory igonoring all primary categaory. please see below impage for expected result.Please guide me. 

 

expected Result.PNG

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

Hi @RAHUL18 ,

 

Add a rank based on yearmonth. Then ceate a color measure based on rank and use conditional formatting.

My Sample:

RicoZhou_0-1663922414419.png

Measure:

Color = 
VAR _RANK =
RANKX(ALLEXCEPT('Table','Table'[Month]),CALCULATE(SUM('Table'[Rate])),,DESC,Dense)
RETURN
IF(_RANK<=3,"Green")

 Result is as below.

RicoZhou_1-1663922445096.png

For reference: Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @v-rzhou-msft 
        Thanks for your reply.
Its not working Sir is there any othe way??

RAHUL18
Frequent Visitor

Hi Sir,

          Thanks for reply.

I tried this soltion but not working for me. In visual it show ranking as per each category. This is not what i look for.Not able to understand how to give rank to overall subcategory .Plese see bellow image for expected result.

expected Result.PNG

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