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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

If text contains then make cell blank

Hi,

 

I have a column which  contains a URL. Some of these URL's contain the text "sig".

 

Within Power query is it possible to change any URL containing "sig" to a blank entry?

 

Example before

Url
www.test1234sig.com
www.test1234.com

 

Example after

Url
 
www.test1234.com

 

Many thanks,

 

Elliot 

1 ACCEPTED SOLUTION

CNENFRNL_0-1638801202396.png

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Does @CNENFRNL 's solution solve your problem, if yes, please kindly accept it as the solution to help the other members find it more quickly.

Best Regards,
Community Support Team _ kalyj

CNENFRNL
Community Champion
Community Champion

 

= Table.ReplaceValue(Source, each [Url], each if Text.Contains([Url], "sig") then "" else [Url], Replacer.ReplaceText, {"Url"})

or

= Table.ReplaceValue(Source, null, null, (x,y,z) => if Text.Contains(x, "sig") then "" else x, {"Url"})

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

Hi,

 

I have tried option 1 and replaced each [url] with the relevant column but are abit confused what to do with regards to the {"url"} section as I do not have any text that contains the string "url".

CNENFRNL_0-1638801202396.png

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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