Forum Discussion

Max_25's avatar
Max_25
Regular Visitor
1 year ago
Solved

Replace import table with direct query table

Hello,

 

I am new to PowerBI and inherited a project from a colleague who has left the company. 

All tables are on import mode and I read a switch from direct query to import is possible, but not the other way around. But I need it as direct query and the file is pretty complex to rebuild (at least I guess so, since I am new to this).

So my idea was to add the datasource again as direct query and replace the import one with it by renaming it the same as the old one and adding the same connections in the model view to it. 

Is this possible or am I completly on the wrong path here? 😄

 

Have a great day,

Max

  • Hi Max_25 
    Unfortunately, it's not possible to simply “switch” a table from Import mode to DirectQuery. These are fundamentally different storage modes, and there’s no direct conversion path between them.

    Your idea — to load the same table again as DirectQuery, rename it to match the original name, and rewire the relationships — can technically work, but you should be aware of some limitations:

    • Not all DAX functions that work in Import mode are supported in DirectQuery. For example, advanced logic with CALCULATE, FILTER, or RANKX might fail or behave unexpectedly.

    • Performance might be impacted, especially if your model is complex or contains many relationships.

    • The behavior of relationships, calculated columns, and calculated tables may differ in DirectQuery mode.

    If you go this route, I strongly recommend testing every calculation in your report carefully and being prepared to make adjustments.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

4 Replies

  • Hello Max_25 

     

    You are correct

    You can switch from Direct Query → Import, but not from Import → Direct Query.

    So to get a report to use Direct Query instead of Import, you have to re-add the data source as Direct Query.

     

    Thanks,
     Pankaj Namekar | LinkedIn

    If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

  • Hi Max_25  there is no direct way to switch from import to direct query, simple things that you can do is

    For Realationships,measures and roles : Save the BIM model of the exisiting report from Tabular editor so that you can have the copy of same Realtionships,Measures or User Roles if any and after creating new dashbaord with direct query you can paste it to that report with tabular editor.

    For Table Transformations
    You can have the copy of M query of each table and copy the same

    I hope this will help you in this transformation
    thank you

  • Hi Max_25 
    Unfortunately, it's not possible to simply “switch” a table from Import mode to DirectQuery. These are fundamentally different storage modes, and there’s no direct conversion path between them.

    Your idea — to load the same table again as DirectQuery, rename it to match the original name, and rewire the relationships — can technically work, but you should be aware of some limitations:

    • Not all DAX functions that work in Import mode are supported in DirectQuery. For example, advanced logic with CALCULATE, FILTER, or RANKX might fail or behave unexpectedly.

    • Performance might be impacted, especially if your model is complex or contains many relationships.

    • The behavior of relationships, calculated columns, and calculated tables may differ in DirectQuery mode.

    If you go this route, I strongly recommend testing every calculation in your report carefully and being prepared to make adjustments.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly