RLS - Custom "No access" message (Power BI)

82 Views Asked by At

Upon setting a RLS filter, users get a blank space if the info contained by the visual (drilled-down table) is not meant for them to see; however, I would like it to display a "No access" message.

I've tried setting a DAX formula upon creating the RLS role in the form of:

IF([Manager] = "John", [Sales], "No access")

But to no avail, visuals just generate an error when activating the role.

1

There are 1 best solutions below

4
Sam Nseir On

You won't be able to do this within the RLS formula itself.
Instead, you could create a Measure similar to:

RLS No Access = COUNTROWS ( ALL('Your RLS Table') ) = 0

Then for example, for the Heading of your visual, you can set it to a Measure similar to:

Heading My Visual = IF([RLS No Access], "No access", "My visual heading")