Forum Discussion

Dunner2020's avatar
Dunner2020
Icon for Post Prodigy rankPost Prodigy
5 years ago
Solved

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?

 

 

  • Anonymous's avatar
    Anonymous
    5 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