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

SHOW LABEL ONLY ON TOP N ITEMS

Good day everyone, 

I would like ask if anybody can help me to solve the problem below. 

 

I have created a donut chart with several items, and I would like to label only on TOP 5 items, so that those label could be displayed without being clipped.

 

Anyone has gone through this matter?? 

I really appreciate it, thanks! 

1 ACCEPTED SOLUTION

@jbang ,

Can you write a measure? For the value what you are trying to showing up create a measure and then use it colors conditional formattiong(fx) of values as a Rules, wherein rules for 1 please provide the color that matches the visual background and then for 0 provide the color you want the labels to display.

Rank segment = 
VAR _rank = RANKX(
   ALL(financials[Segment]),
    [Sales Test],,DESC,Dense)
VAR _result = IF(_rank>3,1,0)
RETURN _result

Arul_0-1679661389251.png

 

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

4 REPLIES 4
Arul
Super User
Super User

@jbang ,

Have you tried visual level filter TOP N, refer the image below.

Arul_0-1679657630984.png

Thanks,

Arul

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


jbang
Frequent Visitor

Hello Arul, thank you for your response! 

But the thing is that I want to display all the items in a donut chart and only show the labels of the TOP 5 items out of the total items. 

 

Could you help me on this matter please? 

Thank you!

 

 

@jbang ,

Can you write a measure? For the value what you are trying to showing up create a measure and then use it colors conditional formattiong(fx) of values as a Rules, wherein rules for 1 please provide the color that matches the visual background and then for 0 provide the color you want the labels to display.

Rank segment = 
VAR _rank = RANKX(
   ALL(financials[Segment]),
    [Sales Test],,DESC,Dense)
VAR _result = IF(_rank>3,1,0)
RETURN _result

Arul_0-1679661389251.png

 

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


jbang
Frequent Visitor

IT´S AMAZING!! 

It works !! Thank you so much!

 

Have a wonderful day!

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.