Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

RLS - Independent Software Vendor Scenario

Hei,

 

I am having a bit of an issue figuring out how to implement RLS. So, I have a typical star schema, with a sales fact table and more dimension tables (item, customer, vendor, seller, buyer, etc). In all the tables I have an AccountID column that identifies the company that the row of data belongs to -> since in the same tables we record the transactions for more companies (our customers). 

 

So, first I figured this is easy, since I have the accountID everywhere, so I just created a role for one of the companies and put a filter on all the tables - e.g. Sales[accountid] = "4433-5643" (aka the accountid number), Item[accountid] = "4433-5643", etc. But since in the sales table not all of the transactions have for example a buyerNo, then I ended up with some sales transactions not showing up anymore. So that is a big issue. 

 

So, any advice on how to implement this? I can filter only the sales transactions, but I want to make sure that for example a customer list filter will only show that companies customers. 

 

I have been looking a bit into bi-directional cross-filter, but should I then add RLS DAX on Sales, and then make all the relationships bi-directional? That doesn't really seem like a good practice?

 

' You can manually enable bi-directional cross-filter with row-level security by selecting the relationship and checking the Apply security filter in both directions checkbox.'

 

Thank you,

Luiza