Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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
Solved! Go to Solution.
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
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
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
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
59 | |
57 |