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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Error on apply Power Query: Expression in partition n/a in table n/a references an unknown entity

let
Source = AzureStorage.DataLake("https://xxxxx.dfs.core.windows.net/contoso-retail-dw/rssfeed/rawdata/date=" & DateTime.ToText(Date.AddDays(DateTime.LocalNow(), -1), "yyyy-MM-dd")),

 

This PowerQuery Source gives a preview without any error, but when "close and apply" this error is shown:

Failed to save modifications to the server. Expression in partition n/a in table n/a references an unknown entity

 

When I change the source to static string it works fine!?

 

let
Source = AzureStorage.DataLake("https://xxxxx.dfs.core.windows.net/contoso-retail-dw/rssfeed/rawdata/date=" & "2020-03-29"),

Status: New
Comments
ImkeF
Super User

Thanks @megank ,
that's very helpful. Would be great if these infos would make their way into the official documentation soon: https://docs.microsoft.com/en-us/power-bi/desktop-enhanced-dataset-metadata .

 

Anonymous
Not applicable

Hallo @megank,

I am glad that this was noticed by the community, because long time ago I thought I am the only one in the world with this issue...
Well, I am aware that turning on preview-feature is a risk and experiment but would always expect that a "feature" does not work but not destroying all of your work without any repair option, just rebuild it new from scratch...
The new XMLA-endpoint is praised as one of the most important things coming up, long exitsing in AAS - so new features related to this should realy be handled very carefully, it was real pain to rebuild a large complex report again...
Getting not so brave anymore with trurning on all preview ... 😉
Regrads
Oliver

Anonymous
Not applicable

Hi @megank 

Another question: I understood that dynamic data source will come...
Does that mean that this post here will also be working then?
(I will never understand that you allow code and function in desktop which do not work in service then - what is the sense in this?)

 

https://community.powerbi.com/t5/Issues/PowerBI-Service-data-source-currently-don-t-support-refresh/...

 

Oliver

edhans
Super User

@megank - thanks for the response. Here is what happened.

  1. Created a file a week or so ago. Before April 2020 desktop was released, and Enhanced MetaData was enabled. I did minimal work on the file.
  2. Opened the file on May 10 with the April 2020 desktop and did a lot more M coding - 4+ hours worth.
  3. All data loaded to the model and I thought all was ok. No apparent issues. Closed file.
  4. Opened file an hour or so later. The DAX model had all of my changes, but when I hit REFRESH everything got messed up. Tables vanished, others appeared. Opened Power Query and all M code was from earlier that day before I got to work! Everything in Power Query was lost.

 

You can see in the file (I'll share the link via a PM, not here in public) that the DAX model shows the following tables loaded:

  • Measure Table (this is not an M generated table)
  • Dates
  • Payment Transactions
  • Sales Transactions

But if you look at the M code, the only tables loaded are below, and the Payment Transactions/Sales Transactions table above don't even exist!

  • Dates
  • Payment Data
  • Payment Details

So only Dates survived, and that is missing some columns in M that were added that morning. As long as I was in the file, the M code was apparently in memory and being used for loading data to DAX, but once I closed the file, none of those M code changes were saved to the PBIX file. SharePoint (via OneDrive for Business) was keeping versions, and none of the versions have any M code updates, just changes to the DAX model as the file morphed during the day.

 

I basically started over with a new file after turning off the Enhanced Metadata feature and have not had an issue since.

 

You should have PM shortly.

 

 

megank
Power BI Team

@edhans Interesting... Some background on the enhanced metadata format: We only save the DataMashup in the pbix file if there are unapplied changes, otherwise we just regenerate the Mashup document from the DataModel. It looks like an old version of the DataMashup hung around on each save, effectively making it look like you had unapplied changes. Then when you clicked "Refresh" it applied those changes, updating the DataModel to match what was in the Power Query Editor. If instead you had hit "Discard changes", we would have brought the Mashup doc in sync with what was in the model.

 

I'll need to do some testing to see if I can understand and repro how this out of data Mashup was included. Let me know if there was anything else interesting about how you saved or opened the file. Did you ever save with unapplied changes?  I'll update if I find anything.

edhans
Super User

Hi @megank - yeah, I saved unapplied changes a lot. It is habit in Power Query in Power BI to save the file, but not apply the changes.

 

Side note: the Measures table is actually an M table - I used the Enter Data feature so it created that M code with a binary blob in it.

 

I have SharePoint version saves going back to May 7, so you might be able to see what happened between the 7th and 10th if you want me to download those and share a ZIP file with all of them, but all of those May 10 saves (there are more after 11:01am) all have no M code beyond what was done on May 7th.

2020-05-12 12_35_59-Reports - Accounting - All Documents and 13 more pages - Work 2 - Microsoft​ Edg.png

megank
Power BI Team

@edhans yes, if you're able to zip and share that would be great!

edhans
Super User

Check your PM's @megank for the link to the zip file. I'm hoping you see a big "what the heck???" between files 2 and 3.

edhans
Super User

@megank - for what it is worth:

  • My computer does not have that backup folder.
  • In troubleshooting, I did uninstall/reinstall the Windows Store version (don't have the downloadable EXE version). Did uninstalling remove that folder, or does the Windows Store version go in a different place?
  • I am not sure this file was ever upgraded. I think it was created as new with the enhanced metadata feature. If that is the case, it wouldn't have been backed up at all, right?
  • Hopeing there is another folder somewhere. I know I have touched about 3 other reports that I would like to have the last 'pre-enhanced metadata' format.
megank
Power BI Team

If you're using the Microsoft Store the backups should be at C:\Users\<user>\Microsoft\Power BI Desktop Store App\TempSaves\Backups

 

As I mentioned in PM, I think I've found the bug causing old Mashups to hang around. Working on a fix, and hope to have it ready for the May 2020 release of Power BI Deskop. In the meantime, if anyone hits this (where the DataModel is correct but the Queries are out of date), click "Discard changes" in the yellow warning bar and it will regenerate the queries based on the model.