Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I would like to create a column that counts the number of items in a comma separated striong as follows:
However, the ProjectCount column is currently returning errors (and needs an IF statement added if the project string has no commas the count should be 1).
This then splits the cost based on how many projects for each row. I shall then be splitting/pivoting the table on the projects.
Any help much appreciated.
Solved! Go to Solution.
Hi @BenGWeeks ,
Try using this calculation instead:
if [Projects] = null then 0 else List.Count(List.PositionOf(Text.ToList([Projects]), ",", Occurrence.All)) + 1
Pete
Proud to be a Datanaut!
Hi @BenGWeeks ,
Try using this calculation instead:
if [Projects] = null then 0 else List.Count(List.PositionOf(Text.ToList([Projects]), ",", Occurrence.All)) + 1
Pete
Proud to be a Datanaut!
@BenGWeeks , This power query code used in DAX new column. Please open data transformation and try it there.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.