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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
Solved! Go to Solution.
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.
Hi @Anpo ,
May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.
Thank you.
Hi @Anpo ,
We’d like to follow up regarding the recent concern. Kindly confirm whether the issue has been resolved, or if further assistance is still required. We are available to support you and are committed to helping you reach a resolution.
Best Regards,
Chaithra E.
Hi @Anpo ,
Thank you @Shahid12523 , @rohit1991 for your inputs.
I hope the information provided is helpful.I wanted to check whether you were able to resolve the issue with the provided solutions.Please let us know if you need any further assistance.
Thank you.
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!