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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.