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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

DAX search in column and retuen a result

Hi,

I am rying to create a measure that looks in to a column and if the column includes the value than true

 

ie

new measure = columnA include/has 'TWO' . Two could be in a sentence with 10 to 20 words

 

id       ColumnA

1      one,two,three,four,five,six.seven

2      one,one,five,six,six,ten

3      six,seven,eight,five,six

 

      so the new measure should return 1

 

I hope that make sense

 

thanks

1 ACCEPTED SOLUTION

@Anonymous,

 

Learn the function by links below.

Community Support Team _ Sam Zha
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

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may try the measure below.

Measure =
VAR s = "TWO"
VAR d = ","
RETURN
    COUNTROWS (
        FILTER ( Table1, SEARCH ( d & s & d, d & Table1[ColumnA] & d, 1, 0 ) > 0 )
    )
    > 0
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

thanks

Anonymous
Not applicable

@Sam

thanks for the respond,

I am not sure if I undrestand the " d & s & d, d & Table1[ColumnA] & d, 1, 0 ) > 0 " part  , could you please explain briefly , thanks

@Anonymous,

 

Learn the function by links below.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.