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

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

Reply
haputhanthree
Frequent Visitor

RLS - Direct Query (function containsrow" is not allowed)

function containsrows is not allowed as a part of row level security on direct query models. 

haputhanthree_0-1634802987515.png


I have blow data structure on backend.

1. Select PBI user and user group.

haputhanthree_1-1634803090169.png

 

2. Each group have customers and these customers Id's should used to filter the sales table.

haputhanthree_2-1634803148462.png

3. Sales table

haputhanthree_3-1634803212046.png

RLS Query Used
[Customer_ID] IN
--get customers assigned to group
SELECTCOLUMNS(
FILTER(
Group_Customers
,Group_Customers[Group_ID] =
--get group ID of there PBI User
SELECTCOLUMNS(
FILTER(
Users
,Users[Emil] = USERPRINCIPALNAME()
), "Group_ID" ,Users[Group_ID]
)
) , "Customer_ID", Group_Customers[Customer_ID]
)


This works fine with the import mode but not in the direct query mode. appreciate your support on this. 

 



2 REPLIES 2
Anonymous
Not applicable

Hi @haputhanthree 

This issue means that direct query doesn't support IN or Containsrow function. You may update your code in RLS, try equal.

For reference:

Row Level Security on a DirectQuery to Power BI dataset composite model My Findings

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous 

Thank you!, but equal does not work for this scenario since it returns more than one Customer_ID.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.