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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Shreenav
Microsoft Employee
Microsoft Employee

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 5
Shreenav
Microsoft Employee
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.

Anonymous
Not applicable

Hi @Shreenav,

You can take a look at the following link to use Value.Native Query() to achieve inline KQL query.

Chris Webb's BI Blog: Inlining KQL Query Fragments Using Value.NativeQuery() In Power Query (crossjo...

Notice: the query part are text values, you can also parameterize and spliced with power query parameters.

Regards,

Xiaoxin Sheng

Followed this article but getting this error: 

Expression.Error: Native queries aren't supported by this value.
Details:
[Table]

Anonymous
Not applicable

HI @Shreenav,

Can you please share some more detail about these M queries that return the error messages?

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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