cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Count Number of Occurences of a certain text

Hello all,

 

I am new to Power BI. I wanted to make a pie chart with the number of occurrences of A, B, C, A&C, B&C etc in the last column of the following table.

 

ask1.PNG

 

For example, the number of times A is present in the last column is 34 and B is 68 and so on. I want to create a pie chart depicting this data. Can someone help me with this?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User I
Super User I

If B is within B&C should be counted?

If not, simply add a pie chart, use any unique column as counter and your B&C/B/A column as category...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Super User II
Super User II

Hey,

 

I guess this is what you are looking for:

 

Just drag your last column to the legend property and also to the value property of the Pie chart, as the column has the data type text, Power BI automatically selects the aggregation function Count.

 

image.png

 

Hopefully this is what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

5 REPLIES 5
Super User I
Super User I

If B is within B&C should be counted?

If not, simply add a pie chart, use any unique column as counter and your B&C/B/A column as category...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Super User II
Super User II

Hey,

 

I guess this is what you are looking for:

 

Just drag your last column to the legend property and also to the value property of the Pie chart, as the column has the data type text, Power BI automatically selects the aggregation function Count.

 

image.png

 

Hopefully this is what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

Anonymous
Not applicable

I would be glad to know how to count B&C in B and C separately. 

Can you clarify?

Should B&C, B and C have THREE different slices in the pie?
Or in a case like
B&C ->3
B ->4 
C ->2

you expect to have TWO slices, one for B (4+3) and one for C (2+3)?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

So, if the data is as following:
B&C occurs 4 times

B occurs 5 times

C occurs 6 times 

 

Then the count of B should be 9 and C should be 10. 

Helpful resources

Announcements
November Update

Check it Out!

Click here to read more about the November 2020 Updates!

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform October Community Highlights

Check out the top community contributors across all of the communities

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors