Forum Discussion

JosueAbreu's avatar
JosueAbreu
Frequent Visitor
3 years ago
Solved

Table with only filtered data

Hi,

 

I have a table and text filters. I need a table who show me data only if i put a text in the filter. Is it possible?

 

Here i have a table showing all data when i haven't put text in the filters. 

 

 

9 Replies

  • AilleryO's avatar
    AilleryO
    Memorable Member

    Hi,

     

    Maybe you can try something with HASONEFILTER to test if you have a filter active,

    if no filter is active then using a fake RC number could return nothing...

    Hope it helps

    • JosueAbreu's avatar
      JosueAbreu
      Frequent Visitor

      Thanks, AileryO.

       

      Using a fake RC don't solve my problem. I have data which i don't wanna to show to everyone. So, if i erase the fake RC the Dashboard will show all data again, right?

      • AilleryO's avatar
        AilleryO
        Memorable Member

        Hi,

        I was thinking that you could build a dynamic table (to show in your visual), with a test using HASONEFILTER.

        Table = 
        VAR MyFilter = IF( HASONEFILTER(XXX), valueFilter , FakeValue)
        RETURN
        FILTER( Table , Param = MyFilter )

        So if there is a filter active, use the active filter, otherwise a fake filter to show nothing.

        I let other member add their contribution to solve this, but this might be a possibllity.

         

        Let us know

    • JosueAbreu's avatar
      JosueAbreu
      Frequent Visitor

      Thanks, Abbas 

       

      I'm new in Power BI and i understood your solution. Thanks for example.

      • AbbasG's avatar
        AbbasG
        Memorable Member

        JosueAbreu  I am glad to hear this!, please accept it as a solution to help others.

  • JosueAbreu's avatar
    JosueAbreu
    Frequent Visitor

    The solution i found was put a button with action to navigate between pages . Then, i show data previosly filtered.

    But it doesn't prevents the user to go to next page without filter the data.

    • AilleryO's avatar
      AilleryO
      Memorable Member

      Hi,

       

      If your eally want to implement security, wouldn't it be better to use RLS ?

      With RLS you can create roles and assign to each role, which lines are filtered or not.

      RLS works only if you publish your report to PBI service, so I don't know if this is possible for you (licence or not and which one).

      Hope it helps

      • JosueAbreu's avatar
        JosueAbreu
        Frequent Visitor

        Thanks, AilleryO.

         

        I didn't know RLS. I will read about.