cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kumar_a_136 Regular Visitor
Regular Visitor

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
adetogni Senior Member
Senior Member

Re: Count Number of Occurences of a certain text

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...

View solution in original post

Super User
Super User

Re: Count Number of Occurences of a certain text

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

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!

View solution in original post

5 REPLIES 5
adetogni Senior Member
Senior Member

Re: Count Number of Occurences of a certain text

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...

View solution in original post

Super User
Super User

Re: Count Number of Occurences of a certain text

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

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
Proud to be a Datanaut!

View solution in original post

kumar_a_136 Regular Visitor
Regular Visitor

Re: Count Number of Occurences of a certain text

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

adetogni Senior Member
Senior Member

Re: Count Number of Occurences of a certain text

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)?

kumar_a_136 Regular Visitor
Regular Visitor

Re: Count Number of Occurences of a certain text

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
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 137 members 1,522 guests
Please welcome our newest community members: