Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Key Word Search leveraging OR

One of my clients wants to have the ability to search records in a dataset from the Service. We added the Text Filter visual which meets most of their needs but they have one more request that I have not been able to figure out how to execute. They want to be able to search for multiple key words and have records that contain ANY of the key words populate in a table presented in a report.

 

For instance, if they use the Text Filter to try and identify COVID related records, they want to be able to search for things like:

 

"COVID", "Corona", "Mask"

 

The result they are looking for would be all records that contain either "COVID", "Corona", or "Mask" as opposed to all records that contain ALL "COVID", "Corona", and "Mask". We also told them using a page level filter in the report's Filter Pane could achieve that but they are instructing all end users to not use the Filter Pane as they are nervous end users may accidentally apply a filter or remove a filter that would cause more calls to their help desk. 

 

Has anyone run into a similar situation? Any help would be greatly appreciated! 

6 Replies

  • What did the developer of the Text Filter visual respond when you approached them with this request?

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Community Support

    Hi, Anonymous 

     

    According to your description, Text Filter visual can't meet your needs, but you can create a measure and put it in the filter pane to dynamically filter the data selected in the slicer, and there is no need for end users to use the filter pane.

    Like this:

    Measure = 
    VAR a =
        DISTINCT ( Table2[Slicer] )
    RETURN
        IF (
            COUNTROWS (
                FILTER (
                    a,
                    CONTAINSSTRINGEXACT ( SELECTEDVALUE ( 'Table'[Column1] ), [Slicer] )
                )
            ) > 0,
            1,
            0
        )

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please upload some insensitive data samples and expected output.


    Best Regards,

    Community Support Team _ Janey

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-janeyg-msft, thank you for responding! This works with the regular slicer but the client is requesting this functionality to be available with a text input. I know you can allow the user to search in standard slicers but it does not work with multiple words. 

      • v-janeyg-msft's avatar
        v-janeyg-msft
        Community Support

        Hi, Anonymous 

         

        Because text filter visual is a custom visual and not official, you can't change its usage at will. Not only did you mention this idea, at least it hasn't been updated until now. Of course, you can try to contact them. Before that, you can also use this workaround to restrict the words entered by the user as a slicer for filtering.

        What I gave is just a workaround, and can support multiple choice of words under the action of measure, can’t you understand?

         

        Best Regards,

        Community Support Team _ Janey