cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Blondyvl
Helper I
Helper 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
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors