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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
mba
Frequent Visitor

Search function with asterisk

Hi all,

Even though support.microsoft.com says:

mba_0-1639151398971.png


... in my column:

 

Keyword: Bryllup = IF(SEARCH( "bryllup*" , someTable[someColumn] , , BLANK() ),TRUE(),FALSE())

 

 
... I get True for many rows like "sometext sometext sølvbryllup sometext sometext", what pretty much contradicts what was written above...

How can I actually change it so that I separate words with leading and trailing characters?

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @mba ;

You could use split in power query.

1. add conditional column,

vyalanwumsft_0-1639451469999.png

2.split it.

vyalanwumsft_1-1639451622913.png

The final output is shown below:

vyalanwumsft_2-1639451664039.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKs7PTS1JrShRQDAO78gpU0gqqszJKS1QwJBXitWJVkpMSlaKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [name = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if Text.Contains([name], "bryllup") then "True" else "Flase"),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Added Conditional Column", "name", Splitter.SplitTextByDelimiter("bryllup", QuoteStyle.Csv), {"name.1", "name.2"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"name.1", type text}, {"name.2", type text}})
in
    #"Changed Type1"

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @mba ;

You could use split in power query.

1. add conditional column,

vyalanwumsft_0-1639451469999.png

2.split it.

vyalanwumsft_1-1639451622913.png

The final output is shown below:

vyalanwumsft_2-1639451664039.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKs7PTS1JrShRQDAO78gpU0gqqszJKS1QwJBXitWJVkpMSlaKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [name = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if Text.Contains([name], "bryllup") then "True" else "Flase"),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Added Conditional Column", "name", Splitter.SplitTextByDelimiter("bryllup", QuoteStyle.Csv), {"name.1", "name.2"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"name.1", type text}, {"name.2", type text}})
in
    #"Changed Type1"

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Samarth_18
Community Champion
Community Champion

HI @mba ,

You can try below code:-

Column = if(CONTAINSSTRING(bryllup[Column1],"bryllup"),TRUE(),FALSE())

Output:-

Samarth_18_0-1639152142888.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Thank you for your answer.

I appreciate your help. Nevertheless, how would I separate it so that I could look for rows that has some leading text with bryllup like "xxxbryllup" and other with trailing text: "bryllupxxx". I don't mean to just spot the word "bryllup", but to inspect if it has some leading/trailing characters next to it 🙂

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.