Forum Discussion

PamelaAG's avatar
PamelaAG
Frequent Visitor
3 years ago
Solved

Search within a text column if one or multiple KeyWords are a match

Hi all, I would like to know if there is a way to create a new column that looks for different keyworkds and create a list of all possible results.  For example, based on the following table    ...
  • ppm1's avatar
    3 years ago

    Here is one approach to consider. I made a disconnected table with your Detail values and used the measure below in a table visual. The row that does not include one of the selected values is automatically filtered out.

     

    ContainsSlicerValue =
    VAR slicerlist =
        VALUES ( SlicerValues[Detail] )
    VAR thisitemdesc =
        MAX ( T3[Item Description] )
    VAR filtered =
        FILTER ( slicerlist, CONTAINSSTRING ( thisitemdesc, SlicerValues[Detail] ) )
    RETURN
        IF ( COUNTROWS ( filtered ) > 0, "Y" )

     

    Pat