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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.