Forum Discussion
Exclude Visuals from RLS
- 11 months ago
Hi Zanqueta,
I ended up hard coding the numbers in a manually created table that I linked to no other tables which prohibited the RLS from being applied. However your solution is rather interesting, and I could see us using this in the future.
Best,
sassy0112
Hello sassy0112,
RLS cannot control objects on your dashboard. It only controls rows based on a predefined rule.
What I suggest in your case is control over the metric itself. Take a look at the example I shared with another colleague recently. The theme was to hide the salary:
We create a table with user allowed to see salary:
After that, we create a measure to check:
.UserPermissionSalary =
var us = USERPRINCIPALNAME()
return
LOOKUPVALUE(dim_PermissionSalary[mail],dim_PermissionSalary[mail],us,BLANK())
Then, iside de salary measure we control:
TheSalary =
var salary = SUM(Salary[Salary])
var alowed = [.UserPermissionSalary]
RETURN
IF(ISBLANK([.UserPermissionSalary]),BLANK(),salary)
I don't know if that meets your needs. Perhaps if you could share some of your data, we could simulate the behaviour you expect here.
✅ If this response resolved your issue, please mark it as correct to assist other members of the community.
- sassy011211 months agoFrequent Visitor
Hi Zanqueta,
I ended up hard coding the numbers in a manually created table that I linked to no other tables which prohibited the RLS from being applied. However your solution is rather interesting, and I could see us using this in the future.
Best,
sassy0112
- v-aatheeque11 months ago
Community Support
Hi sassy0112
Thanks for the update and for sharing the approach you used.
If any of the suggestions provided helped , it would be great if you could acknowledge that in the thread. This will make it easier for others facing similar issues to identify useful solutions and benefit from your experience as well.