cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors