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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Markzolotoy
Impactful Individual
Impactful Individual

Query with parameter

I am migrating a SSRS subreport to a paginated subreport. The subreport has a dataset that is based on a select from a stored proc. The select uses subrepport parameter. I see that I can create a parameter Power Query Editor/ Manage Parameters. But I can't see how I add this parameter to a particular query. Any idea?

 

Update. I was able to run SP, but when applying I am getitng the following:

Incorrect syntac near keyword EXECUTE. Incorrect syntax near ')'

 

Thanks

4 REPLIES 4
Anonymous
Not applicable

Hi @Markzolotoy 

Please take a look at the following links about use DAX query, parameters with report builder if they help:

https://www.mssqltips.com/sqlservertip/5865/sql-server-reporting-services-report-builder-with-dax-qu...

https://docs.microsoft.com/en-us/sql/reporting-services/tutorial-add-a-parameter-to-your-report-repo...

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

@Anonymous One link shows how to add a parameter to a report, the other shows how to use SSAS with Report Builder, again not a my case.

amitchandak
Super User
Super User

@Markzolotoy , Are you looking for something like this

https://www.fourmoo.com/2020/10/08/power-query-m-passing-parameters-dynamically-to-a-sql-server-quer...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Actual code looks like this:

Source = Sql.Database("localhost", "Vanduradb_New1", [Query="EXEC SP_Name " & #"ID" & ", " & "1"])

 

That seems to work. When I create a paginated report based ont that dataset how will I provide the ID parameter?

Helpful resources

Announcements
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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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