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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
MeiYing
Helper I
Helper I

Pie chart in power bi

Hi, 

 

I am trying to display number of orders in pie chart by different categories (which I use legends). The pie chart is able to display number of orders in slices with the value label on each slice. But, when there is only one category, the value is not displayed in center (just like the image below). I cannot find any setting to make the alignment in center. I saw one online post saying that we can use transparent card to display the data in this case, but it works only when there is one category. Has anyone encountered this issue before?  Thank you all in advance!

MeiYing_0-1715053624987.png

 

1 ACCEPTED SOLUTION

Hi @MeiYing ,

You can make a card not to display anything when there isn't a single category in the current filter context

card  measure =
IF ( SELECTEDVALUE ( data[category], "" ) = "", [measure] )

The second argument in SELECTEDVALUE returns a specific value when there are more than one values  available. If not specified, it will return blank() instead of something  not visible. You can use FORMAT function to format [measure] as desired.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
MeiYing
Helper I
Helper I

Hi @danextian , thanks for the reply! Sorry, I think the way I wrote is a bit confusing. I don't want to use the card to display value for multiple categories. I want the pie chart to be like, display the value in center when there's only one category. But seems like there's no option to achieve that. 

Hi @MeiYing ,

You can make a card not to display anything when there isn't a single category in the current filter context

card  measure =
IF ( SELECTEDVALUE ( data[category], "" ) = "", [measure] )

The second argument in SELECTEDVALUE returns a specific value when there are more than one values  available. If not specified, it will return blank() instead of something  not visible. You can use FORMAT function to format [measure] as desired.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
danextian
Super User
Super User

Hi @MeiYing ,

 

There is no option to center-align a pie chart's data label when there's only one category.

As to the use of card, I don't get why you'd want to use it with multiple categories. How do you intend the show the label?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.