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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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