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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculate values one row / one columns

Hi everyone, I am working with a projectplanning dataset. We have a list of possible opportunities with different candidates dedicated to them. For each opportunity I would like to calculate the number of candidates. The data is something like this:

 

Project nameCandidates
Datalake at X10000005, 10000012, 10000008
Data ingestion at X10000005, 10000006
Impelementation at X10000007
business Intelligence at X10000009, 10000008, 10000011, 10000010

 

The desired outcome would be:

Project nameCandidatesNumber of candidates
Datalake at X10000005, 10000012, 100000083
Data ingestion at X10000005, 100000062
Impelementation at X100000071
business Intelligence at X10000009, 10000008, 10000011, 100000104

 

Anyone know a way to do this?

 

Thanks in advance!

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Anonymous 

create a new column

Number of candidates = PATHLENGTH(SUBSTITUTE('Table'[Candidates], ",", "|"))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

4 REPLIES 4
az38
Community Champion
Community Champion

Hi @Anonymous 

create a new column

Number of candidates = PATHLENGTH(SUBSTITUTE('Table'[Candidates], ",", "|"))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hi thanks for your quick answer, this worked like a charm!

AlB
Community Champion
Community Champion

Hi @Anonymous 

I guess you could create a calcualted column that counts the number of commas (and add 1), since that seems to be the separator:

Number of candidates =
LEN ( Table1[Candidates] ) - LEN ( SUBSTITUTE ( Table1[Candidates], ",", "" ) ) + 1

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs

Cheers 

SU18_powerbi_badge

Anonymous
Not applicable

Hi @AlB I am going with the solution of @az38 because your calcuation also returns a "1" when the candidate field is empty and the other solution doesn't. Would eb a good solution if everythign is fileld in tho, but I didn't provide u the information that there were missing values.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.