Forum Discussion

marama's avatar
marama
Icon for Helper I rankHelper I
4 years ago
Solved

Hide content based on username

Hi!
I want only specific users to be able to see the content of the column, so I was hoping to be able to create a measure like this:

note_masked =
IF(USERPRINCIPALNAME()="[email protected]", 'table'[note] , "XXXX")

But it does not work, because it's a measure (hence aggregation). What would be the right approach here, how to achieve the goal?

4 Replies

  • I believe I've made it work by using 

    FIRSTNONBLANK
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi marama ,

       

      I am so gald that you could solve your problem by yourself. Please kindly Accept your workaround as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file without sensitive data.


      Best Regards,

      Rico Zhou

    • Orstenpowers's avatar
      Orstenpowers
      Icon for Post Patron rankPost Patron

      marama !
      Hi, I do have similar problem like you had.

      What was the measure finally looking like? Could you post it? Thx!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi marama,

     

    If you want to restrict specific end user to have access to specific columns, I suggest you to try OLS (preview) which could be configured in third party tool : Tabular Editor .

    Object-level security (OLS) enables model authors to secure specific tables or columns from report viewers. 

    For reference:

    Announcing public preview of Object-Level Security in Power BI

    Object Level Security In Power BI

    Implementing Object-level Security in Power BI

     

    Best Regards,
    Rico Zhou

     

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