Forum Discussion

Kashinoda's avatar
Kashinoda
Icon for Advocate I rankAdvocate I
8 years ago
Solved

Restrict Column Access with RLS - Almost there but some annoyances.

Hi All,

 

I have a Sales table which contains a SalesDescription, a small number of these descriptions are confidential - though everyone should be able to see additional sales information (SalesNumber, SalesAmount etc.)

 

I pulled the SalesDescription field into a new table, added a ConfidentialFlag column and added an RLS role 'Everyone' which allows all users to see the description where ConfidentialFlag = "N". Another RLS role uses a lookup table which allows certain users to see confidential descriptions.

 

My issue is when viewing a report as 'Everyone' role, the SalesAmount does not show where rows from the confidential table are blocked. Interestingly this does NOT happen on older PowerBI versions (e.g. Oct 2017) but does happen on the latest desktop and PowerBI Online.

 

 

 

 

 

 

 

  • Managed to solve it by making the relationship between DimSales and FactSalesConfidential inactive then using a measure to return the description instead.

     

     

4 Replies

  • shebr's avatar
    shebr
    Icon for Resolver III rankResolver III

    Hi Kashinoda

     

    Can you provide the screenshot of your role formula? It seems to be doing what I expect it to be doing, not sure what you are trying to achieve exactly here? Have you added the 'regular' user to the role memebership or not?

     

    Thanks

     

     

    • Kashinoda's avatar
      Kashinoda
      Icon for Advocate I rankAdvocate I

      Hi shebr

       

      Sorry by regular user I mean the 'Everyone' role, I've updated the original post to include the output from an older PowerBI version (which is what I want). Here is the role, very simple:

       

       

  • Managed to solve it by making the relationship between DimSales and FactSalesConfidential inactive then using a measure to return the description instead.

     

     
    • AshwiniGutha's avatar
      AshwiniGutha
      Frequent Visitor

      Hi 

      I have similar situation where I need to hide column data based on users, but I have to hide whole column data for specific users.

      Can you please help how to acheive this