Forum Discussion

POSPOS's avatar
POSPOS
Post Partisan
9 months ago
Solved

How to implement object level security which will also be applied on personalize visual

Hi All, I have a reqiuirement to implement page level security and object level security and also enable "personalise this visual" feature. I implemented page level security + personalise this featu...
  • Zanqueta's avatar
    Zanqueta
    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