Forum Discussion
80%-20% pie chart
Hi there,
I have created a measure that calculates the no of events that occurred. Now I want to show no events that occurred in different areas of the town using a pie chart. I used Area code as legend and no of events occurred as the value in the pie chart and it created following visual:
I want to change this pie chart into an 80%-20% look so that it only shows the name of area code and their proportions that makeup 80% of total incidents and shows the remaining 20% as 'others'. Is there any way of doing that in Power BI?
- Anonymous5 years ago
Dear Dunner2020 ,
Based on your description, you can create a Cumulative events column as follows.
Command:
calculated events =
SUMX(
FILTER('Sheet1','Sheet1'[no of events occurred]>= EARLIER(Sheet1[no of events occurred])),
'Sheet1'[no of events occurred]
)
AB =
var
cal_percent=DIVIDE('sheet1'[calculated events],SUM(Sheet1[no of events occurred]))
return
IF(
cal_percent<= 0.8,"80%","Others"
)
Result:
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- AnonymousNot applicable
Hi Dunner2020 - In power Query, you can create a custom column and group the rows based on some logic (Others/Non Others). Use this new column in your pie chart and it will divide the chart in 2 groups.
Hope this gives some pointers,
Cheers,
-Namish B
- amitchandak
Super User
Dunner2020 , You have topN and other, Or bucket by percentile
TOPN +others
https://www.youtube.com/watch?v=UAnylK9bm1I
Top 80/20 , percent /percentile - But bucketing you have to create
https://blog.enterprisedna.co/implementing-80-20-logic-in-your-power-bi-analysis/
https://forum.enterprisedna.co/t/testing-the-pareto-principle-80-20-rule-in-power-bi-w-dax/459
https://finance-bi.com/power-bi-pareto-analysis/
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Calculate-the-sum-of-the-top-80/td-p/763156 - AnonymousNot applicable
Dear Dunner2020 ,
Based on your description, you can create a Cumulative events column as follows.
Command:
calculated events =
SUMX(
FILTER('Sheet1','Sheet1'[no of events occurred]>= EARLIER(Sheet1[no of events occurred])),
'Sheet1'[no of events occurred]
)
AB =
var
cal_percent=DIVIDE('sheet1'[calculated events],SUM(Sheet1[no of events occurred]))
return
IF(
cal_percent<= 0.8,"80%","Others"
)
Result:
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.