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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Blondyvl
Resolver I
Resolver I

Text to column in Power Bi - IF isnumber

How do i complete a formula similar to the followiing that im using in excel so i complete this in Power BI please. =IF(ISNUMBER(SEARCH("Photo-Display",H2)),$I$1,"")

Many thanks

 

1 ACCEPTED SOLUTION

I made a work around help collumn to remove the - from the words then used the 
Remove the hyphen = SUBSTITUTE([Parental Consent.1], "-", " ")
 then made seperate collumns for each option. 
 IF(
CONTAINSSTRINGEXACT([Consent.1],"School Visit"),
"School Visit"

View solution in original post

3 REPLIES 3
SpartaBI
Community Champion
Community Champion

@Blondyvl can you share a sample pbix or a sample data and the desired result in PBI?

I can't share the file, however i have got this working for the first few words in the string seperated by commas, im now stuck on the words with the dash in the middle. 

 

I have a collumn that could contain any of these in a string seperated by a comma. 

School Visit, PE Fixture, Medical, Blood transfusion, Biometric Consent, Photo-Display, Photo-Social Media, Photo-Press, Photo-Class Photo, Photo-Productions.

 

Im trying to seperate this string to make collums that only show me the people that have consented for the options they have ticked .

 

Eg

School Visit collumn =
IF(
CONTAINSSTRINGEXACT([Consent.1],"School Visit")||
CONTAINSSTRINGEXACT([Consent.1],"School Visit"),
"School Visit"
 
How can i use this with words with a dash in the middle. Thanks
Blondyvl_0-1655404878247.png

 

I made a work around help collumn to remove the - from the words then used the 
Remove the hyphen = SUBSTITUTE([Parental Consent.1], "-", " ")
 then made seperate collumns for each option. 
 IF(
CONTAINSSTRINGEXACT([Consent.1],"School Visit"),
"School Visit"

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.