To optimize your Power BI data model when using DirectQuery, it is important to follow these best practices.

Understanding DirectQuery behavior

When using DirectQuery, Power BI translates DAX queries on the fly into SQL code, which is then executed against the underlying database.
Because of this, DirectQuery comes with certain limitations when using complex DAX functions. The complexity of your data model also impacts how efficiently Power BI can generate SQL statements — and therefore directly affects query performance.

Recommended table modes

Typically, it is the Fact table that should be set to DirectQuery mode.
It is recommended that related Dimension tables are set to Dual mode to balance performance and flexibility.

⚠️ If you combine a Dimension table in Import mode with a Fact table in DirectQuery mode, Power BI will create weak relationships.

Strong vs. weak relationships

Weak relationships are visualized by a half circle on the relationship line in the Model view of your Power BI semantic model.


If all your relationships are strong, you will not see any half circles.

It goes without saying that strong relationships are much better for both performance and data accuracy in Power BI.

Why strong relationships matter

1. Performance and Query Folding

  • In DirectQuery mode, Power BI translates visuals and DAX calculations into SQL queries.

  • When relationships are strong and well-defined, Power BI can generate optimized SQL joins that fold efficiently to the source database.

  • Weak relationships often prevent query folding, causing Power BI to retrieve unnecessary data or perform joins locally — which significantly reduces performance.

A weak relationship can force Power BI to pull entire tables into memory and join them client-side — which is extremely slow.

Changing table storage mode (Import, DirectQuery, Dual)

As of November 2025, if you have already imported tables in Import mode, you cannot change them directly to DirectQuery or Dual mode from within the standard Power BI interface.

However, you can update the mode manually in the TMDL (Tabular Model Definition Language) area of Power BI Desktop:

  1. Open the TMDL view in your Power BI project.

  2. Drag all tables onto the canvas.

  3. Make a copy for the script in a separate tap for backup.

  4.  Search for the property “Mode:” for the table you wish to change.

  5. Replace the existing value (Import) with either "DirectQuery" or "Dual".

  6. Press Apply.

💡 Tip: Before applying the changes, you can copy the TMDL script to a separate tab as a backup. This allows you to revert easily if needed.

Related resources

For more information about combining Import and DirectQuery tables for writeback and performance optimization, please visit: https://kb.accobat.com/kb/guide/en/import-and-direct-query-KRh0hWhiNs/Steps/3137021