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.
- vinaypugalia9 years agoResolver I
Hello Eric,
The solution you have shared will work for sure. But my concern is, what if the user applies filters to the report.
For e.g. if the user filters the data by Geography, or say Date Range, etc., this is very much possible that the TOP performer for the filtered geography or the selected date range might change but if we calcualte it from backend/precalcualte the rank, it will remain constant.
Hence, please guide how to handle this situation.
Thanks,
Vinay
- mmanwaring10 years agoResolver I
Thank you Eric
worked a treat.
Regards
Mike