March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have created four Roles (Full Company, North, South East, and South West) via Row Level Security. The way this RLS will be implemented is by assinging the user email address (userprincipalname) in the Power BI Service against the Role. When a user logs in using their userprincipalname the correct Role will be assigned to the user and thus they can only see their granted data.
I would like to know if there is a way, using DAX, to check which Role name (i.e. Full Company, North, South East, or South West) is being used - what would be the DAX to achieve this?
My aim is to provide a tailored message, via a card or another visual, that will instruct the user based on the role being used. For example, is the North Role is being used when viewing the report then a message like "This North region will show you.....", or if the South East Role is being used a message like "The South East region incorporates...". I suspect a Switch function will be require but the key thing is using DAX to check which Role is being used by the user.
Thanks in advance.
Solved! Go to Solution.
Hi @judspud - thanks for your response but I have it all sorted now.
I was overthinking it. I simply used the SELECTEDVALUE function on the table that the Role (RLS) was applied against.
Hi @Anonymous
How are you implementing the RLS? i.e. which table/field are you using to filter the data?
Also, can a user be part of multiple roles?
Thanks,
George
Hi @judspud - thanks for your response but I have it all sorted now.
I was overthinking it. I simply used the SELECTEDVALUE function on the table that the Role (RLS) was applied against.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |