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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
tyokokokok2
Frequent Visitor

Using (2) parameters in a KQL function from Power Query

Ok, about to check myself into a ward.

 

Anyone had success with this?  I've already developed a function in Kusto that takes the two variables; one string, one date.

The parameters come from a user.

Calling it from PQ is funky, imo.  Funky in that it seems impossible.  

 

 

 

let pinteresting = interesting, 
    peventdate = "datetime([eventdate])",
    stringqry= "EventsParsed_FN([pinteresting],[peventdate])"
    Source = AzureDataExplorer.Contents("https://<my>.westus2.kusto.windows.net", "<myDB>", stringqry, [MaxRows=null, MaxSize=null, NoTruncate=null, AdditionalSetStatements=null])


in
    Source

 

 

 

😣

4 REPLIES 4
spinfuzer
Super User
Super User

What is interesting referencing?  Is that some other query you have written?  Is that supposed to be text?

What is "datetime([eventdate])" referencing.  That is just text.  What does the final outneed need to look like for stringqry and some example parameters?  Is it upposed to to be text and date as a number? 

 

let pinteresting = "interesting", 
    peventdate = #date(2023,1,1), // or #datetime(yyyy,m,d,h,m,s) or #Date.FromText("1/1/2023")
    stringqry= "EventsParsed_FN(" & pinteresting & "," & Number.From(peventdate) & ")",
    Source = AzureDataExplorer.Contents("https://<my>.westus2.kusto.windows.net", "<myDB>", stringqry, [MaxRows=null, MaxSize=null, NoTruncate=null, AdditionalSetStatements=null])


in
    Source

 

'Interesting' references a string variable that needs to come from the user.  I have a Power Automate flow that will request the user input but have no examples on how to use it in Power Bi.

'eventdate' is also from user.

 

'Interesting' references a string variable that needs to come from the user.  I have a Power Automate flow that will request the user input but have no examples on how to use it in Power Bi.

'eventdate' is also from user.

 

tyokokokok2
Frequent Visitor

Please tell me this is possible.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors