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
Anonymous
Not applicable

Pie Charts Groups

I have a data set where I want to display a pie chart that has a field with how many items are over 20 and how many items are between 10 and 20 and items that are less than 10. How would I go about doing this?

 

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @Anonymous 

You may use below formula to get the column.Use the column as 'Legend' in pie chart.

Column = IF(Table1[Item]<10,"<10",IF(Table1[Item]>20,">20","10-20"))

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

I would not suggest using a calculated column formula approach simply because you will not have a solution dynamic enough to respond to filter/slicer selections.  Ideally there should be a measure based solution.  Share a sample dataset and in a simple Table, please show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-cherch-msft
Employee
Employee

Hi @Anonymous 

You may use below formula to get the column.Use the column as 'Legend' in pie chart.

Column = IF(Table1[Item]<10,"<10",IF(Table1[Item]>20,">20","10-20"))

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
darentengdrake
Resolver II
Resolver II

Hi @Anonymous ,

 

I don't know if this is the quickest way, but this is one way.

 

What you can try to do is create a new column using measures, write an IF-ELSE statement that refers back to the column that has the numbers, e.g. If x is greater that 20, insert a A, if x is greater than 10 but less or equals to 20, insert a B, if x is smaller or equals to 10, insert a C.

 

Once you've done that, you can put the defined measure into the pie chart, and have it under "Count".

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.