Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Empty visual if search box is empty

Hi all,

Hope someone can help me with the following.

On the left side, you can see a lot of information.

I do not want to see this info at all if the search box is empty.

So, If a container_nr is mentioned in the search box, I only want to see the corresponding info of this container_nr on the left side.

Thanks!

John

  • Hi Anonymous ,

     

    Create a measure similar to the one below:

    Filtering = IF(COUNTROWS(ALL('Table'[cat])) = COUNTROWS(ALLSELECTED('Table'[cat])), BLANK(), 1)

     

    Now filter the table visualization for all non blank values:

     

     

    Be aware that with this syntax if all your container number start with the same letter in this case M and it's the only value that is inputed in the search bar the result will also be an empty table.

2 Replies

  • Hi Anonymous ,

     

    Create a measure similar to the one below:

    Filtering = IF(COUNTROWS(ALL('Table'[cat])) = COUNTROWS(ALLSELECTED('Table'[cat])), BLANK(), 1)

     

    Now filter the table visualization for all non blank values:

     

     

    Be aware that with this syntax if all your container number start with the same letter in this case M and it's the only value that is inputed in the search bar the result will also be an empty table.

  • V-lianl-msft's avatar
    V-lianl-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    You can also create a disconnected table as a slicer, then create a measure and apply it to the visual level filter.

     

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.