cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
atrinhatra Member
Member

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

Accepted Solutions
Community Support Team
Community Support Team

Re: DAX search in column and retuen a result

@atrinhatra,

 

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.
5 REPLIES 5
Community Support Team
Community Support Team

Re: DAX search in column and retuen a result

@atrinhatra,

 

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.
atrinhatra Member
Member

Re: DAX search in column and retuen a result

@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

Community Support Team
Community Support Team

Re: DAX search in column and retuen a result

@atrinhatra,

 

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.
atrinhatra Member
Member

Re: DAX search in column and retuen a result

Thanks

atrinhatra Member
Member

Re: DAX search in column and retuen a result

thanks