Forum Discussion
How to implement object level security which will also be applied on personalize visual
- 9 months ago
Hi POSPOS, thank you for you feedback.
Unfortunately, OLS does this with objects. I always think of it in the context of data consumption via dataset, connecting an Excel file, for example. In a single pbix file, what I would suggest in your case is:
1) Hide the column or entire salary table from all users.
2) Have a metric in DAX that calculates the salary but within it a variable that allows a certain group to see or not see the value.
.UserPermissionSalary = var us = USERPRINCIPALNAME() return LOOKUPVALUE(dim_PermissionSalary[mail],dim_PermissionSalary[mail],us,BLANK())TheSalary = var salary = SUM(Salary[Salary]) var alowed = [.UserPermissionSalary] RETURN IF(ISBLANK([.UserPermissionSalary]),BLANK(),salary)I made a sample file. I hope it helps.
If it works, please give me a KUDO and mark the solution as the answer to help other users.
Pbix File: https://drive.google.com/file/d/1Xbnce-WL2qg1O4SQZHU6xGI0tkOizyfU/view?usp=sharing
Hi POSPOS ,
I would also take a moment to thank Zanqueta , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions