Forum Discussion

BugmanJ's avatar
BugmanJ
Helper V
8 months ago
Solved

RLS Security with External Customers (Dynamic) with also conglomerated data?

Hi All, In my scenario, I have a dashboard which tracks how long it takes a customer to deliver and leave my site (delivery time) and hence I have a dashboard showing for each warehouse, the avera...
  • anilelmastasi's avatar
    8 months ago

    Hello BugmanJ ,

     

    you can create a RLS table like customerid, companyname, domain.

    and you can create relationship to table like Customers. after that anyone signing in with abc.com only sees rows where Customers[Domain]=abc.com

     

    For second question, RLS blocks all non matching rows so average(deliverytime) will only show the current customer's average. To show all customers average time, you should use all(customers) in your calculate.

  • amitchandak's avatar
    amitchandak
    8 months ago

    BugmanJ , Couple of ways. 
    1. Create a table that has all the needed dimensions, like date, etc., but no customer-related columns, and do not join with the customer dimension joining with RLS . This will dynamically act to all or all selected in your measure as per need 

    2. Have a static column in the fact Average(Table[Time]) , this will static avg after every load