Forum Discussion

abayless's avatar
abayless
Icon for Advocate II rankAdvocate II
3 years ago
Solved

RLS for dynamic Page buttons

I have two tables. The first, Personnel, looks like this. There is also a measure named [Page Role] that returns the Page View for the current user.   Email Page View [email protected] EP s...
  • v-yueyunzh-msft's avatar
    3 years ago

    Hi , abayless 

    Here are the steps you can refer to :

    (1)First , we do not need to create relationship between two tables:

    (2)We can create a role in "Manage roles":

    In "User" Table we enter this dax :

    [Email] =  USERPRINCIPALNAME()

    In "Page Sec", we enter this dax:

    var _user =USERPRINCIPALNAME()
    var _Page =MAXX( FILTER('User','User'[Email]=_user) , [Page View])
    var _page_names ={_Page,"O&R"}
    return
    [Page Name] in _page_names

    (3)Then we can meet your need , the result is as follows:

     

    Best Regards,

    Aniya Zhang

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