Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All,
I have splitted the string to multiple columns by Edit Query option. I just want to get count of column that has value.
See below example of table splitting.
Can someone help on this?
Solved! Go to Solution.
Agree with @Anonymous, but if his suggestion is not option, a new column with this formula would do the trick:
List.NonNullCount(Record.FieldValues(_))
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @arjunsk,
I agree with pawelpo's point of view, you can add a column to store the count of list which split your cell text with particular separator.
For example:
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "Count Item", each List.Count(Text.Split([Column],",")))
Reference:
Function | Description |
---|---|
List.Count | Returns the number of items in a list. |
Text.Split | Returns a list containing parts of a text value that are delimited by a separator text value. |
Regards,
Xiaoxin Sheng
Hi @arjunsk,
I agree with pawelpo's point of view, you can add a column to store the count of list which split your cell text with particular separator.
For example:
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "Count Item", each List.Count(Text.Split([Column],",")))
Reference:
Function | Description |
---|---|
List.Count | Returns the number of items in a list. |
Text.Split | Returns a list containing parts of a text value that are delimited by a separator text value. |
Regards,
Xiaoxin Sheng
In my opinion, it's not the best idea to split the data into columns when you have multiple items in a single column. Why not split strings into rows? (this option is also available in Power BI Desktop transformations) Then you could perform a simple COUNT for each issue row to find the number of related issues.
Agree with @Anonymous, but if his suggestion is not option, a new column with this formula would do the trick:
List.NonNullCount(Record.FieldValues(_))
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |