Forum Discussion
RLS in powerbi
Hi All,
In Rls I don't want to show any country value to a user how can i do that any ideas? For example in above image i am showing only East region and i will add emails of the people they can see only East region. In My case i don't want to show any region to some users how can i do that?
Thanks in advance
- Anonymous4 years ago
Hi , Anonymous
You can follow the steps below .
- Create a card to work as a mask for the visual.
- Write a measure to check if there is a filter on the desired column (type Boolean)
- Write a measure to display a user message on the card based on the user selection (type Text).
- Write a measure to render the visual blank when nothing is selected (type Whole Number).
- Write a measure that returns either the background colour or “transparent” based on the user selection (type Text), and set that to conditionally format the background colour of the card .
More info about hiding the table to some users , you can refer to the link below .
https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- Burningsuit
Resident Rockstar
Hi Anonymous
There are many different ways you could accomplish this, depending on what is wanted and how your data is structured.
You could have a RLS role with the DAX expression '[Region] <> "East"' which would allow viewing of any records NOT in the East Region.
You could have a DAX role with the DAX expression '[Region] <> "North" || [Region] <> "South" || [Region] <> "East" || [Region] <> "West"'
which would only show Regions NOT in North, South East or West.
Or you could have a role whith the DAX Expression 'ISBLANK([Region])' which would only show blank Regions.
You have the whole DAX language to create an expression that evaluates to TRUE, it then depends on your data on how to impement it.
Hope this helps
Stuart
- AnonymousNot applicable
Hi Burningsuit ,
Thanks for detailed explanation, In my current case i have table visual with three rows of data. I want to hide the table to some users. Is there any way to apply RLS to specific visual like table visual. - AnonymousNot applicable
Hi , Anonymous
You can follow the steps below .
- Create a card to work as a mask for the visual.
- Write a measure to check if there is a filter on the desired column (type Boolean)
- Write a measure to display a user message on the card based on the user selection (type Text).
- Write a measure to render the visual blank when nothing is selected (type Whole Number).
- Write a measure that returns either the background colour or “transparent” based on the user selection (type Text), and set that to conditionally format the background colour of the card .
More info about hiding the table to some users , you can refer to the link below .
https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.