Forum Discussion
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?
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"))
Regards,
3 Replies
- AnonymousNot applicable
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".
- v-cherch-msft
Microsoft 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"))
Regards,
- Ashish_Mathur
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.