Forum Discussion
PIE Chart - Counting Values
- 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 🙂
- Anonymous4 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. - Anonymous4 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 - 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 🙂
Whibley92 yeah, absolutely you can do it. But, as you mentioned, for large tables with many columns it can lead to data redundancy and duplication. For example, if you created a measure such as COUNTROWS before the Pivot / Unpivot in Power Query, you will likely find that it will be a different result to that after the Pivot / Unpivot. This is the same with other aggregation fucnctions such as SUM.
One way to ensure you don't run into these issues is by structuring your model appropriately. So, for example, if you are working on a large table that has a range of categorical data (imagine an Employee Master File in a single table, for example), there are columns associated with 1) Address, 2) Bank Accounts, 3) Personal attributes, etc. For each category, you could create a table that has the Employee Id, Address Line 1, Address Line 2, Suburb / Region, State, Country, Postcode. Similarly, with teh Bank Account details you could have the Employee Id, Bank Account Name, BSB Number, Bank Account Number, SWIFT, etc.
Hopefully the above provides some additional context!
Cheers mate.
Theo
- Khushboobarai9 months agoHelper IV
- TheoC9 months agoCommunity Champion
Khushboobarai this is likely because of the Visual settings you have applied. I recommend you "reset" the Visual settings and then try again to format it how you would like. Hope this helps.
- Khushboobarai9 months agoHelper IV
I did tried in that way too, reseted the whole setting even tried by creating new one on the same page, what happens is that once I edit any setting from the visualixation pane know the pie showing everything clear but the moment I tried to filter anything, after 1-2 click it again the same issue... With hieght 166 and width 233.
Is there anything more ways from which i can do?