Forum Discussion

Gasdetect40's avatar
Gasdetect40
Frequent Visitor
4 years ago
Solved

PIE Chart - Counting Values

Good Day!   As seen in the pics below I want to count how 'Event Descriptions' there are and put them in a Pie Chart in Power BI. I have leanrt how to do it in Excel but with all my internet search...
  • TheoC's avatar
    4 years ago

    Hi Gasdetect40 

     

    If you go to canvas view in Power BI Desktop, select a Pie Chart.  Drag the Event Description column into the Legend space and then drag the Event Description into the Value space.  Make sure to click the down arrow on the Event Description in the Values section and click Count.

     

     

    Hope this helps.

    Theo 🙂

     

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Gasdetect40 ,

     

    Agree with TheoC to simply use the summarize type of "Count" for Event type:

     

    Or you could create a measure to calculate the count of each description:

    Measure = CALCULATE( COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Event description]))

     

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi TheoC ,

     

    Of course! as you mentioned, COUNTROWS ( 'Table' ) is enough for this simple case. I'm just used to “fullfill” the measure in case there are some more complex situations. Sorry for the redundant operation😜

     

    Best Regards,
    Eyelyn Qin

  • TheoC's avatar
    4 years ago

    Hi @Gasdetect40 

     

    If you go to canvas view in Power BI Desktop, select a Pie Chart.  Drag the Event Description column into the Legend space and then drag the Event Description into the Value space.  Make sure to click the down arrow on the Event Description in the Values section and click Count.

     

     

    Hope this helps.

    Theo 🙂