Forum Discussion

mmanwaring's avatar
mmanwaring
Resolver I
10 years ago
Solved

RLS - creating a measure to overide RLS

Hi All   I have added RLS to a test dashboard.   My aim is to create a dashboard and share with a number of users. Each user will have data restriced to their sales only!   i have been asked as...
  • Eric_Zhang's avatar
    10 years ago

    mmanwaring

    As per the online document Row-level security, the RLS filter the dataset directly. So I don't think your approach would ok.

    In your case, to see a KPI against the top sales person in the condition that each user only has data restriced to their sales only, I think you can use a custom column storing the top sales.

    TotalSalesForEachSaler = CALCULATE(SUM(Listings[sales]),FILTER(Listings,Listings[salerid]=EARLIER(Listings[salerid])))
    
    TopSales = MAXX(Listings,Listings[TotalSalesForEachSaler])

     

    If you have any question, feel free to let me know.