Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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!
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.
Proud to be a 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?
Proud to be a Super User!
User | Count |
---|---|
87 | |
72 | |
69 | |
64 | |
54 |
User | Count |
---|---|
99 | |
91 | |
80 | |
74 | |
64 |