I have been doing a lot of work recently using Power BI Premium Per User and recently I got the following error below when trying to update my fact table in Power Query.

“An unexpected error occurred (file ‘tmsavepoint.cpp’, line 1503, function ‘TMSavePoint::GetProxyImpl’)”

This is what the actual error looks like.

This is rather a confusing error and it can be difficult to troubleshoot. In this blog post I will explain how I overcame this error.

Why is this error happening?

When I had a look using ALM Toolkit, I could see that there was the following difference between my PBIX file and the Power BI Service dataset.

What I can see below is that there is a difference between what is in my PBIX file and the Power BI Service dataset when looking at where the Power Query query is stored.

Once it has been deployed to the Power BI Service and the incremental partitions have been created the query belongs to the table definition and not the partition.

This is what my PBIX table looks like when also viewing it using the ALM Toolkit. Here I can see that the Power Query query is part of the Import and is an expression.

This got me thinking that this might be why the error is occurring.

How I resolved the error

Now for me to get this working I thought what if I have to then make the changes directly in the Power BI Service.

Yes, I understand this is risky. I can manage the risk by taking a copy of the existing table definition and if something goes wrong, I can always put the same syntax back in.

The first step is I had to get the updated Power Query from Power BI Desktop, I went into the Power Query Editor, I then went to my fact table, and clicked on Advanced Editor.

I then copied everything in the advanced editor.

Then I had to log into the Power BI PPU Dataset using Tabular Editor

I then selected my database after logging in.

I then navigated to my fact table where I have got the incremental refreshing and I want to update the underlying Power Query query.

There is a little trick, which is that the actual query is not stored within the partitions, but it is stored at the table level under the section “SourceExpression”

Another thing to note is that when clicking on the drop down arrow the space is typically too small. What I do is to copy and paste the query to notepad and then paste it into the SourceExpression window.

Once I have updated the query, I always go back in to double check that the changes I have made have actually been updated.

NOTE: DO NOT CLICK ON SAVE, this will save it back to the dataset and could potentially change your existing partitions

I then updated it, by clicking on Model -> Deploy

I logged in and selected my database.

Then deploy with this to make sure all the data is not lost I ensured that I ticked both “Deploy Table Partitions” and “Deploy partitions governed by Incremental Refresh Policies”

I then clicked Next and then Deploy.

Once deployed in the bottom right it says successful

I had now successfully updated my Power Query, Query!

Finally, I could go back to my dataset and a particular partition and refresh it using either SQL Server Management Studio or Tabular Editor.

Summary

In this blog post I have shown how to deploy changes to PPU when there have been incremental partitions created in the Power BI Service.

Any comments or suggestions are most welcome!

Enjoy the rest of your week, and thanks for following along.