Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Workaround to convert Pbix file from Import to Direct Query mode

Hi, 

 

Is there an easy way to conver pbix file create in import mode to direct query mode.  I understand, Copy paste visuals from import pbix file to direct query as long as the meta data matches, works  fine but i dont want to go this route. 

 

Bascially, I am looking to understand , when get the data from source we set the Import/Direct Query toggle button, what part in M Query sets the source to be import /direct query that I can change configuration . 

 

What if we save the Pbix file as template with connection parameters?

The new XMLA Read/Write features , can it be helpful in this context?

 

regards

 

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could refer to this blog:

https://xxlbi.com/blog/switching-from-imported-data-to-directquery-or-live-connection-in-power-bi/

Note: This link contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Finally the way I handled it was , disabled the table queries in transfromation layer.  Added new queries with direct query with same table and column names. deleted the import tables and re-did the relationships.

It worked with minor tweaks. 

DataZoe
Employee
Employee

I tried to do this recently, but abandoned it because many of the DAX expressions I had used in building the import model were not compatible with direct query model. 

 

If I were to go about it now, I would create the model as direct query to start with, and keep that as the model I modify in future. Then when I'm done, I would save as a different name and switch it from direct query to import (as that is simply click and be done). So, I would have 2 models, one import and one direct query that I would publish.  I'd always have to make changes in the direct query model save that, then change to import and override the import model pbix save.

 

Then I could create a new pbix as the report with the all the visuals and connect via power bi datasets to either model (import or direct query) and use them interchangeably.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Anonymous
Not applicable

Thanks, I do see the beniefit of isloation. In this specific case, it is a more of a migration work for to fix. 

 

regards

@Anonymous In that case, I was able to pull the bim file out using tabular editor, but I think you would still need to create the data sources in a new bim as direct query, then bring the tables in from the import bim defintions. 

 

If the model is not too big, it's not too bad to just recreate. I only had 10 or so tables, so I had created the direct query data source in a new PBIX,  then I used that with the mscripts I had for the other tables to recreate them. I then re-added the measures/columns. That's when I realized I had so many DAX issues that I didn't want to fix :). 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could refer to this blog:

https://xxlbi.com/blog/switching-from-imported-data-to-directquery-or-live-connection-in-power-bi/

Note: This link contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Pragati11
Super User
Super User

HI @Anonymous ,

 

Currenlty, there is no way to switch back to DIRECTQUERY mode from IMPORT mode.

Refer the following similar thread:

https://community.powerbi.com/t5/Desktop/Convert-Import-to-Direct-Query/m-p/293361

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.