cancel
Showing results for 
Search instead for 
Did you mean: 

*** BUG *** Error updating metadata when using Direct Query

We have an issue in PowerBI:

A user has been making changes to a SQL view (added three columns) and used these new fields for some calculations in PowerBI. The user had no problems after updating the view and then refreshing data on her computer: The new fields where added.

 

She uploaded to GitHub and I downloaded from there. But I cannot USE these new fields (I can see them in the column list, but when using them, I get the below error).

 

So to me it seems as if the data is somehow ALMOST gone through in PowerBi (I can see the columns and data in the PowerQuery part), but when using them in PowerBI Desktop it fails.

 

We are using the same version of PowerBI Desktop (Nov. 2021).

 

Feedback Type:
Frown (Error)

Timestamp:
2021-12-13T15:33:04.4298783Z

Local Time:
2021-12-13T16:33:04.4298783+01:00

Session ID:
988b5a4e-39fa-4d85-9f18-01d77c9bc16c

Release:
November 2021

Product Version:
2.99.862.0 (21.11) (x64)

OS Version:
Microsoft Windows NT 10.0.14393.0 (x64 en-US)

CLR Version:
4.7 or later [Release Number = 528049]

Peak Virtual Memory:
98.7 GB

Private Memory:
896 MB

Peak Working Set:
1.13 GB

IE Version:
11.4350.14393.0

User ID:
aa0d4a4e-ea00-4543-9971-2869ea091d68

Workbook Package Info:
1* - da-DK, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.

Telemetry Enabled:
True

Model Default Mode:
Composite

Model Version:
PowerBI_V3

Enabled Preview Features:
PBI_rdlNativeVisual

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_azureMapVisual
PBI_dataPointLassoSelect
PBI_compositeModelsOverAS
PBI_dynamicParameters
PBI_enhancedTooltips
PBI_enableWebView2
PQ_WebView2Connector
PBI_useModernFormatPane
PBI_scorecardVisual

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

DPI Scale:
100%

Supported Services:
Power BI

Status: Investigating

Hi,

According to your description, it seems that you opened the pbix file on a different PC environment and the report is using the Direct query mode, do you have the access to the SQL Server data source in your PC environment?

 

And you said that you can’t use the newly added three columns, do you have access to use the original columns in the Power Query? I think you can go to have a check.

 

I also suggest you to update to the latest version of the Power BI desktop.

 

For more info, please refer to this link:

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

Comments
v-robertq-msft
Community Support
Status changed to: Investigating

Hi,

According to your description, it seems that you opened the pbix file on a different PC environment and the report is using the Direct query mode, do you have the access to the SQL Server data source in your PC environment?

 

And you said that you can’t use the newly added three columns, do you have access to use the original columns in the Power Query? I think you can go to have a check.

 

I also suggest you to update to the latest version of the Power BI desktop.

 

For more info, please refer to this link:

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-about

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

ofrede
New Member

Thank you for your response.

 

Yes, I downloaded the pbix file on another (virtual) pc. But we are on the same network and have access to the same databases.

 

Yes, I can see the new columns when I open PowerQuery - including data. So the updated view is recognised by PowerQuery.

When I go back to the PowerBI report, I can also see the fields in the fields list, but whichever I select, reports an error (as the one in the original post).

 

What I since learned is that if I open the PowerQuery and see the new colunms then Update/Load the data and then saves my pbix-file and reopens it, it works!

 

It is a workaround which should not be necessary, but as long as the workaround works, I'm happy 🙂

 

And confirm: Both users (creator of original pbix and myself) are using newest version of PowerBI Desktop.

 

/Ole

v-robertq-msft
Community Support

Hi, 

As far as I’m concerned, if the data model is changed in your Power BI dataset, you need to go to the Power Query to apply the changes to make the data model reconnect to the Power BI dataset.

 

You can use the Power Query Editor to connect to one or many data sources, shape and transform the data. You could modify the data in hand to meet your needs, make it more usable, and then load that model into Power BI Desktop.

 

For more info about the use of the Power Query, please refer to this link:

https://www.edureka.co/blog/introduction-to-power-query/

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

ofrede
New Member

Thank you Robert Qin,

 

But I already opened the PowerQuery and saw the changes (saw the added columns with data) and pressed the "Apply and Load" button - but I could not use the actual columns in the PowerBI report before I saved the report, closed PowerBI and reloaded the report. The "save, close and reload" report should not be necessary (it's only a minor glitch - but when I initially wrote my post, I didn't know it was a workable workaround).

 

Best regards

Ole