Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

filter data based on user email

I would like to show only the data related to the viewer email, from what I read around it should be feasable in Power BI, 

however I can't find a way.

 

I have already all the data in my data set, with 2 kind of users, employees and DMs, I would like to show different data (even in different pages) 

 

EMP CODEEMP AREAEMP EMAILDM EMAIL
123AAA[email protected][email protected]
456BBB[email protected][email protected]

 

EMP AREA connects this table to all my other data (1:many relationships)

 

Anyone could help?

Thanks in advance 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  Anonymous ,

     

     

    As Greg_Deckler said, to verify that your configured rls is in effect, just select view as. The reference is below:

    Best Regards,
    Adamk Kong

     

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

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous Yes, this is done by creating an RLS rule on the table and using USERPRINCIPALNAME such as:

    [EMAIL] = USERPRINCIPALNAME()

    • Anonymous's avatar
      Anonymous
      Not applicable

      Many thanks!

      I've done the following and seems to work

       

      But is there any way to test this? 

      I've tried "View as" but whatever I select the data doesn't seem to be filtered 

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Anonymous So when viewing as, you need to select the role and then "Other user" and type in the email address of the other user who you want to impersonate.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

     

     

    As Greg_Deckler said, to verify that your configured rls is in effect, just select view as. The reference is below:

    Best Regards,
    Adamk Kong

     

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