The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying to apply RLS in a semantic model and I keep getting the following error:
" A calculated column or RLS expression on a DirectQuery table cannot reference tables from a different data source. "
However, the expression uses tables that are located in the same data source.
Any suggestions?
Thanks
The error happens if your model mixes sources (e.g., multiple connections or Import + DirectQuery).
Fix: ensure all RLS tables come from the same DirectQuery source and avoid calculated columns on DirectQuery tables. Use relationships/bridge tables instead.
Hi @Anpo
This error happens because in DirectQuery mode, RLS or calculated columns can only reference tables from the same source group and with the same storage mode. Even if both tables point to the same database, if they were loaded through different connections (separate “Source” steps in Power Query) or if one is Import and the other is DirectQuery, Power BI treats them as different sources. To fix it, make sure all the tables used in your RLS filter come from a single connection (use “Reference” instead of creating new queries), and set their storage mode consistently (DirectQuery or Dual). If cross-table logic is unavoidable, push the filter to the database (views/security filters) or handle it with measures instead of calculated columns.