Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
function containsrows is not allowed as a part of row level security on direct query models.
I have blow data structure on backend.
1. Select PBI user and user group.
2. Each group have customers and these customers Id's should used to filter the sales table.
3. Sales table
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.
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.
Thank you!, but equal does not work for this scenario since it returns more than one Customer_ID.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |