Forum Discussion

anhducvu00's avatar
anhducvu00
Regular Visitor
4 years ago

RLS (ROW LEVEL SECURITY) do not work when i use USERELATIONSHIP in DAX


With this data model, i can caculate easily with USERELATIONSHIP in dax. But when i use RLS to grant permission to user, it get error.

 

However, i have known that "USERELATIONSHIP cannot be used when row level security is defined for the table in which the measure is included. For example, CALCULATE(SUM([SalesAmount]), USERELATIONSHIP(FactInternetSales[CustomerKey], DimCustomer[CustomerKey])) will return an error if row level security is defined for DimCustomer."

Link

 

I have changed the Data Model by Merge Queries between crm_lead(all about lead-sale information) and sale_order(all about order information), but hr_daily_expense(all about ads spend/day) have really no foreign key with 2 other tables.

 

 

So how can i design a data model or use a method which can help me solve this problem with RLS (ROW LEVEL SECURITY)