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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.