cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Girish_123
Frequent Visitor

How to calculate number of occurrence.

I have a column like this 

Col 1

mango

orange

mango

grape

orange

mango

orange

mango

apple

 

need an out put like 

mange 4

orange  3

Grape  1

Apple 1

1 ACCEPTED SOLUTION
mahoneypat
Super User
Super User

In the query editor, select your Col 1 and hit the Group By button and accept the default aggregation of Count to get this.

 

mahoneypat_0-1638020631935.png

 

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

1 REPLY 1
mahoneypat
Super User
Super User

In the query editor, select your Col 1 and hit the Group By button and accept the default aggregation of Count to get this.

 

mahoneypat_0-1638020631935.png

 

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Power BI Show Ep 4 Post Show Carousel.jpg

The Power BI Community Show

Shabnam Watson demos Incremental refresh & Hybrid Tables and Leila Etaati demos Charticulator.

PBI April Release 2022 768x460.png

Check it out!

Click here to read more about the April 2022 updates!

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!