Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Greg888
Helper I
Helper I

Counting number of values in a column

Hi all 

Is there a way of counting the number of values in a column in Power BI (see screen shot below)

I also have this column, comma separated.

 

For instance 10 70 = 2

 

Greg888_0-1666599798142.png

 

1 ACCEPTED SOLUTION
hannibalmads
Advocate III
Advocate III

Create a Custom Column and add this formula:

List.Count(Text.PositionOf([Home Team Goal Minute],",",Occurrence.All )) + 1

 

Your screenshot shows that it is separated by a space and not a comma, if that's the case then this should work:

 

List.Count(Text.PositionOf([Home Team Goal Minute]," ",Occurrence.All )) + 1

 

View solution in original post

3 REPLIES 3
Greg888
Helper I
Helper I

Thanks @hannibalmads I really need to get more into Custom columns, it's so powerful yet I've never really explored it properly. Any good resources you could recommend? Thanks again

Great to hear. Power Query and the M language is totally underappreciated (in my opinion) in terms of documentation as well as usage, but this book is my bible

https://excelguru.ca/master-your-data/  

hannibalmads
Advocate III
Advocate III

Create a Custom Column and add this formula:

List.Count(Text.PositionOf([Home Team Goal Minute],",",Occurrence.All )) + 1

 

Your screenshot shows that it is separated by a space and not a comma, if that's the case then this should work:

 

List.Count(Text.PositionOf([Home Team Goal Minute]," ",Occurrence.All )) + 1

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors