Forum Discussion

matskah's avatar
matskah
Frequent Visitor
1 year ago
Solved

Row-Level-Security Aggregation

Hello everyone, I am still relatively new to this environment, but I have a very specific requirement in the context of row-level security: The requirement comes from a customer in the pharmaceutic...
  • Sergii24's avatar
    Sergii24
    1 year ago

    With RLS you provide the access only to the selected rows. Make a table in Excel, filter it accordingly and see if you can calculate ALL things that you want from that filtered view. This will be your answer.

     

    One workaround that comes to my mind is to calculate totals and # of customers in Power Query and store them as a separate table. Then, using RLS you can filter 2 tables in different way: the one that cotains all individual sales will contain only sales of that person, so he/she doesn't see other records. In the same time the same user will have an access to a separate table, calculated in Power Query that contains only aggregated numbers. Because calculation happens in Power Query, which is executed before RLS applied, the user will have the access to these aggregated numbers. Give it  atry and let us know if you managed to obtain what you wanted!

    P.S. a strong advice: use multiple table approach rather looking for wokrarounds with a single table on which RLS is applied 😉