cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LeeM
New Member

Count number of instances aginst each entry

Hi,

I'm a new user to Power BI and trying to replicate some functionality that I use in Excel.

Using an existing Excel table which has entries of A1:A10.

I use the following =Countif(A:A,A1) in cell B1, which I then copy down to the end of the data B10

Against each row (B1:B10) it would then show how many times the text in the referenced cell appears in the array.

I want to try and replicate this in power query.

I've searched and searhced but can't find anything that gives me the individual answers.

Many thanks Lee

 

LeeM_0-1662561431661.png

 

 

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @LeeM ,

 

Please create the new column.

 

Column = COUNTROWS(FILTER('Table','Table'[Name] = EARLIER('Table'[Name])))

vkkfmsft_0-1662604842410.png

 

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

View solution in original post

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @LeeM ,

 

Please create the new column.

 

Column = COUNTROWS(FILTER('Table','Table'[Name] = EARLIER('Table'[Name])))

vkkfmsft_0-1662604842410.png

 

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

serpiva64
Super User
Super User

Hi,

can you post an exemple in excel?

Hi serpiva64, I've updated the original post with an example. Thanks Lee

Helpful resources

Announcements
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors
Top Kudoed Authors