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
Jeedddy88993
Frequent Visitor

Direct Query & Dynamic Parameters

Hi All,

 

After spending around 2 days looking for a solution, I'm left no option but to ask the help of the PBI Gurus.

 

Background : I'm trying to use a Stored Procedure in PBI which needs 2 Parameters (Date/Time & Number) to run successfully. Ideally, I would like to have 2 slicers on the report, so the user can select their criteria and it query the DB then return the results. 

 

I've now managed to get this to work within the Power Query editor however now I run into the issue. I then realised that Dynamic Parameters is not compatible with Import mode when I couldnt locate the 'Bind to parameter' option in the modelling window. I've since recreated the workbook ensuring that all queries are set as 'Direct Query'. 

 

Issue 1 :  Despite (all) data sources being set up as 'Direct Query', I'm unable to get the dataset to successfully load. I'm presented with the below error

Jeedddy88993_0-1717514178956.png

 

I can see this was a bug a few years back but I can't see that it was ever confirmed that it was resolved. See below

 

https://community.fabric.microsoft.com/t5/Desktop/Why-is-DECLARE-not-supported-Error/m-p/40983#U4098...

https://community.fabric.microsoft.com/t5/Desktop/Incorrect-syntax-in-Power-BI-but-query-works-fine-...  

 

P.S. Please dont suggest using the '() =>' method as this with change the query back to Import. 

 

Issue 2 : I ran a seperate query (set to Direct Query) which loads perfectly fine, however I still don't get the prompt to 'Bind to Paramter' option, making me think that there could be a wider issue at play. 

Jeedddy88993_3-1717515351304.png

 

 

Jeedddy88993_1-1717515266728.pngJeedddy88993_2-1717515306859.png

 

I'd greatly appriciate any assitance/guidance you can give. If more detail is required, please let me know.

 

3 REPLIES 3
Jeedddy88993
Frequent Visitor

@Greg_Deckler Are you able to help with this?

Greg_Deckler
Community Champion
Community Champion

@Jeedddy88993 First question is whether you are following this article: Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler @  I am following that guide(and others to fill in the gaps). All is fine until i want to bind the paremte

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.