Forum Discussion

Shreenav's avatar
Shreenav
Microsoft Employee
2 years ago

Syntax for Dynamic M query

I want to write a Dynamic query in power editor to import dynamic data with a parameter let us say subsId. In KQL, I want that to filter my data with a where clause of subscriptions id in a list. What type of parameter should I create? What should be syntax of the query in power editor? 

Let us say I create a parameter "SelectedSubsIds", what should be the type, and how should I write the syntax "where subsId in ....."

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Shreenav,

    What type of data source are you worked? If you mean the SQL or Oracle data source which support query string, you can try to parametrize them with query parameters to achieve dynamic M query. (these query string will get different results when you changes on the query parameters)

    Regards,

    Xiaoxin Sheng

  • Shreenav's avatar
    Shreenav
    Microsoft Employee

    Working with Kusto(KQL). Need syntax help there only, if you can provide any demo M query that selects a data from a Kusto table with a where clause of ids in "parameter".

    Now this parameter should be such that it binds to a column of ids and I be able to add a slicer for these ids with multi-select and select all enabled.