Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

RLS with super user(kind of admin)

Hi Team,

 

I would request someone to help me with the issue I have. 

 

I have RLS implemented in a report like below  :

 

Role = User

 

DAX expression =

[useremail] = userprincipalname() 

|| if ( maxx (filter ( 'table', 'table'[useremail] = userprincipalname() ) ,

'table'[is_admin] ) = 0,

'table'[usereamil] = userprinicipalname(), TRUE )

 

This role is giving full access to the user who's [is_admin] = 1 and for others who's [is_admin] = 0, it gives only their information.

 

My question is when an admin(who's [is_admin] = 1) logs into the report, I need to show his details only instead of everyone's and only when he wants to view others he can search for others and see all data. 

 

1 REPLY 1
lbendlin
Super User
Super User

This is what I get when I put your expression through DAXFormatter.com:

 

DAX expression =
'table'[useremail] = USERPRINCIPALNAME ()
    || IF (
        MAXX (
            FILTER ( 'table', 'table'[useremail] = USERPRINCIPALNAME () ),
            'table'[is_admin]
        ) = 0,
        'table'[useremail] = USERPRINCIPALNAME (),
        TRUE
    )

 

Are you sure this is what you wanted?

 

Usually in such scenarios you create separate roles for super users.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.