Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
anhducvu00
Regular Visitor

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.

anhducvu00_0-1652773964661.png

 

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.

anhducvu00_1-1652773978043.png

 

 

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

2 REPLIES 2
Villezekeviking
Most Valuable Professional
Most Valuable Professional

amitchandak
Super User
Super User

@anhducvu00 , refer this old solution

https://community.powerbi.com/t5/Desktop/USERELATIONSHIP-and-RLS/m-p/787463

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.