cancel
Showing results for 
Search instead for 
Did you mean: 
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
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Dev Camp Session 26

Check it Out!

Mark your calendars and join us on Thursday, September 29 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors