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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.