Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
Having a column like below,
Data:
"[""bTravel"",""bTravel Planning"",""travel booking"",""travel planning""]"
[]
"[""engine"",""news"",""search""]"
[]
"[""collaboration"",""connect"",""connections"",""network""]"
Column Data
To get the count of the words in each cell using a delimiter comma(,).
Used fx as below for the specific count of keywords,
New Column name is keywords count.
= Table.AddColumn(applicationcatalog_Table, "keywords count", each List.NonNullCount(Text.Split([keywords],",")))
Result:
Result of Count
Why its displaying resuit as 1 in cell, instead of 0 as result for [] in the coulun(keywords count) cells.?
Thank you.
Solved! Go to Solution.
Hi @ssspk ,
The list after separating by "," is not empty, so the function works as designed, the solution is
You can add another column:
= Table.AddColumn(#"Added Custom", "Custom", each if [keywords] = "[]" then 0 else if [keywords] <> "[]" then [keywords count] else null)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ssspk ,
The list after separating by "," is not empty, so the function works as designed, the solution is
You can add another column:
= Table.AddColumn(#"Added Custom", "Custom", each if [keywords] = "[]" then 0 else if [keywords] <> "[]" then [keywords count] else null)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Thank you for your time and solution. Its working fine.
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 |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |