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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have 5 related tables. I have to block users by role
If i enable the 'import' mode below expression is working but not in Direct query mode. Is there any method to convert it so i can use it in direct query mode?
[id] IN SELECTCOLUMNS (
FILTER (
'user_project',
(RELATED('users'[id]) = VALUE(USERNAME()) &&
RELATED('roles_groups'[name]) <> "Power User")
), "projects", [project_id]
)
Hi @rsathish_red,
SELECTEDCOLUMNS() is not a supported function in Direct Query connection mode.
Best regards,
Yuliana Gu
How should i rewrite the query to work in DirectQuery?
Did you find a solution?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |