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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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