Forum Discussion

LuisRuizPujalte's avatar
LuisRuizPujalte
Frequent Visitor
2 years ago

Dinamic M query Parameters

Hi, I need help witj aplying M query parameters and I cant solve the problem.

 

I want to conect to a Oracle DB in direct query mode, using dinamic parameters with slicers in order to filter de SQL query.

 

When I try to apply the steps for filtering Numeric fields, all is OK:

 

The problem is when I try to do the same with a text field in the Oracle DB. In power query all seems to be OK but in the report I obtain this error when apply a filter:

 

 

What is happening? i do exactly the same but it only works with numeric fields. 

 

Thanks and help pls 😞

 

2 Replies

  • Hello - no need to use parameters in M Code for this. Make your connection, then just add the filters you want the users to filter by to your filter pane in Power BI - they will select what they want and your visual will render.

    • LuisRuizPujalte's avatar
      LuisRuizPujalte
      Frequent Visitor

      Hello, this is just a demo. The final SQL nativ query will contain subselects with, for example, a range of dates. Because of that, I need to aplly dinamic parameters to the sql query, in order to reduce que time of compilation.