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

View all the Fabric Data Days sessions on demand. View schedule

Reply
J4ns3n
Frequent Visitor

Dynamic M query Selection

Hi All, 

At the moment I am using Dynamic M queries within my SQL querie which is in Direct query mode. The rest of the tables which I am using are in import mode. The Dynamic M query works fine when I use the specific ID's of the parameters in the where clause, but only with the slicer which uses one selection. Selecting one value without the single select function does not work. I have a few quetions about this: 

- Is it possible to have multiple parameters in your SQL where clause Parameter? 

- As I am using ID's in the sql querie, is it possible to filter on a name (which is connected to the ID's)?

- When is a parameter excatly changed and is the Direct query fired? 

 

Eventually what I want to reach is that I have a matrix on the first page (imported table) and I want to create a drill through to the details which are in direct query mode. By using the filters/parameters I want to improve the speed of the details query. So when you drill through from the matrix to the details you will only see the selected values.   

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

 Is it possible to have multiple parameters in your SQL where clause Parameter? 

yes but it is your responsibility to sense if the parameter is coming in as scalar value or as list (via Value.Is ) and to modify your SQL query accordingly.

When is a parameter excatly changed and is the Direct query fired?

when a user interacts with your report in a way that requires a recalculation of that query.

View solution in original post

2 REPLIES 2
J4ns3n
Frequent Visitor

In addition to my question I found out that you should put the slicers on the same page as your direct query will be fired. You can hide them and use sync slicers if you make selections on a different page, but it is needed. 

lbendlin
Super User
Super User

 Is it possible to have multiple parameters in your SQL where clause Parameter? 

yes but it is your responsibility to sense if the parameter is coming in as scalar value or as list (via Value.Is ) and to modify your SQL query accordingly.

When is a parameter excatly changed and is the Direct query fired?

when a user interacts with your report in a way that requires a recalculation of that query.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors