Forum Discussion
RLS - creating a measure to overide RLS
- 10 years ago
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.
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.
Thank you Eric
worked a treat.
Regards
Mike