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
DataFun
Frequent Visitor

Update Imported Data Model from Power Query

I have built a data model in Power Query and imported it into Power BI using File | Import | Power Query, Power Pivot, Power View.  This data will be updated on a monthly basis.  From Power BI, if I go to Transform Data and try to update the data source, the source is pointing to the original raw data before it went through Power Query.  If I update the source to the new raw data file, won't all the transformations done in Powery Query be lost?  Do I instead update my monthly data by doing a full import again?  Thank you.

 

DataFun_0-1689871787934.png

 

4 REPLIES 4
flath
Helper II
Helper II

Hi,

Have you tried to copy the Power M code you wrote on Power Query (outside Power BI) and paste into the Advanced Editor on Power Query (via "Transform Data" button on Power BI ribbon) for each query added with raw data?

DataFun
Frequent Visitor

Looking at this further, I did a fresh import into a new PBIX file and I see that the M code in Power Query is included in the import so I do simply need to point to the raw data files.

DataFun
Frequent Visitor

I will look into this.  I have multiple data sources and I perform some transformation in Power Query to prep the data before bringing it into Power BI and additional transformation in Power BI to support the specific visualizations.  I thought if it is possible to import a data model into Power BI it would be feasible to update that as well.  Another angle I may try is instead of just loading a connection in my Power Query file, I could Load to a table and map to those tables.  This would match the tables I need in Power BI but also dramatically increase the size of the files.

You can also try to create dataflows in which you could load the tables and do the data-prep instead of doing on Desktop.
I'm used to use this approach when the size of data and quantity of transformations on data-prep phase are significant.
If you're not using a Premium license you'll have some limitations on what kind of transformations you can do, but at least you'll be able to do the main cleaning steps before loading it to the pbix.

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.