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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
beeper
Frequent Visitor

Dynamic SQL Query Works on Desktop, Fails to Refresh Once Published

I'm receiving the following error when attempting to refresh my dashboard online:

 

Data source error{"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"[Unable to combine data] Section1/Open Order SAP Data/Changed Type references other queries or steps, so it may not directly access a data source. Please rebuild this data combination."}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},{"code":"Microsoft.Data.Mashup.MashupSecurityException.DataSources","detail":{"type":1,"value":"[{\"kind\":\"SQL\",\"path\":\"..."}]"}},{"code":"Microsoft.Data.Mashup.MashupSecurityException.Reason","detail":{"type":1,"value":"PrivacyError"}}],"exceptionCulprit":1}}} Table: Open Order SAP Data.

 

I need to query SQL to acquire data related to specific orders found in an Excel spreadsheet. This works fine in Power Query using Power BI desktop. However after publishing the dashboard, it is not able to refresh. All data source privacy levels are set to None. How can this be fixed? Currently my dataflow is:

  1. Get the list of orders from Excel spreadsheet.
  2. Convert list to a comma-separated string, e.g. "123, 124, 125"
  3. Use the comma-separated string in the predicate of the SQL Server query using Import mode.
  4. Combine SQL data with existing data for visualizations.

Error:

PBI Error.png

 

Open Order SAP Data query:

Power Query SQL.png

2 REPLIES 2
GilbertQ
Super User
Super User

Hi @beeper 

 

What happens if you change the data sources to be Organizational?

 

And if that still fails you might have to put both of the Power Query details into a single table?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Changing the data source privacy levels to Organizational still results in the same error. Can you expand on putting them in the same Power Query table? Do you mean having everything done in one single query? I'm not sure I can do that as I'm getting data from several different files on Sharepoint and performing joins on them with data from SQL.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.