Forum Discussion
Dynamic M Query Parameter
Hello All,
I want to pass my Slicer filter directly to SQL source in power BI using Dynamic Parameter.I created two parameter but the Binding to paramter option is not showing in the Modelling tab. Could you please help on this how to modify the M query and how to get the Parameter binding option .Below is the sample SQL query and i used direct query mode only
SELECT * FROM Table
WHERE
"Application_ID" = 'PIC' AND
"BuName" = 'BU'
- Anonymous3 years ago
my requirement i need to use Direct query mode only and the above SQL is sample only i have huge millions of data in my DB.Thats the reason I am planning to use dynamic M query Parameter
Since you are not importing your data in Direct Query, the approach will work. However, if you prefer Dynamic M Parameters, this article shows a relevant example of how to do it.
Power BI Dynamic M Query Parameters – Debbies Microsoft Power BI, SQL and Azure Blog (home.blog)
Note, another option would be to add Filter steps in your query (instead of using a native query) for those fields and use the parameters there (and still bind them).
Pat
3 Replies
- ppm1Solution Sage
This is possible but why not just connect with Direct Query with no native query, and use slicers for those two columns on your page. The selected values will be passed back as filters to your source.
Pat
- AnonymousNot applicable
my requirement i need to use Direct query mode only and the above SQL is sample only i have huge millions of data in my DB.Thats the reason I am planning to use dynamic M query Parameter
- ppm1Solution Sage
Since you are not importing your data in Direct Query, the approach will work. However, if you prefer Dynamic M Parameters, this article shows a relevant example of how to do it.
Power BI Dynamic M Query Parameters – Debbies Microsoft Power BI, SQL and Azure Blog (home.blog)
Note, another option would be to add Filter steps in your query (instead of using a native query) for those fields and use the parameters there (and still bind them).
Pat