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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
aaron_carter95
New Member

Dynamic M query Parameter to SQL Source Not Working in Web Service Version of Report

Hello,

 

I have created a dataset that uses direct quert to sql server with the new dynamic M query parameter feature. The overall model uses a live connection to a power bi dataset and some direct query connections to sql.

 

The dynamic parameter is a value selected from a table in the power bi dataset.

 

Everything works correctly in desktop but breaks in the web service. On any visuals that contain data from the direct query tables, i get the following error:

 

The cartridge generated a statement that is not valid because more than one text statement was generated, the statement was not the correct type, or more than one parameter list was generated.

 

 

 

Any adivce on what is causing this would be great.

2 REPLIES 2
ahmadov_10
Helper II
Helper II

Hello according to your post, I think you tried to set up a dynamic source query solution (I don't know if in import or DirectQuery mode), I want to put a dynamic query solution for a user on the power BI service, when he opens the report, the query only loads the data for its region
(a dynamic solution to avoid loading all the data) is it possible?
https://community.powerbi.com/t5/Power-Query/dynamic-parameter-value-in-sql-query-source-power-bi/m-...

v-henryk-mstf
Community Support
Community Support

Hi @aaron_carter95 ,

 

It seems to be a problem that many users have responded to recently. Our engineers have reported this issue to the product team. Please be patient for the fix and you will be notified.

 

Solved: Help with Published report using a parameter in Dy... - Microsoft Power BI Community


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.