Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Filtering by text within text column

Hello amazing community!

Does anyone know if it is possible to create a mesure which will filter the column 'purpose' and return only those rows which contain exact wording, for example, 'design' as on the below screenshot?

Many thanks for any formula suggestions!

Anna

  • Anonymous's avatar
    Anonymous
    3 years ago

    Finally, only this formula worked:

    FilterMeasure = CONVERT (CONTAINSSTRING( 'Table' [purpose], "FM"), INTEGER)

2 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi Anonymous 

    is it only one key word or you have list of key words placed in a separate table?

    If so then you can place the following measure in the filter pane of the table visual, select "is not blank" then apply the filter.

    FilterMeasure =
    COUNTROWS (
        FILTER (
            CROSSJOIN ( VALUES ( 'Table'[Purpose] ), VALUES ( List[KeyWord] ) ),
            CONTAINSSTRING ( 'Table'[Purpose], List[KeyWord] )
        )
    )
  • Anonymous's avatar
    Anonymous
    Not applicable

    Finally, only this formula worked:

    FilterMeasure = CONVERT (CONTAINSSTRING( 'Table' [purpose], "FM"), INTEGER)