Forum Discussion

nehakumar's avatar
nehakumar
New Member
2 years ago

Dynamic m query parameter with date range selection in azure data explorer (kusto)

Hi,

I've a requirement wherein I need to pull data from ADX (azure data explorer). The data volume is so high that the visual errors out with an error message ("size limit : 500000 rows exceeded"). As an alternative, I am trying to implement a solution using dynamic m parameters that will call a function in ADX and will return only the aggregated rows. 

Function accepts two parameters = Date & companyName (both are multiselect fields).  The multiselect on companyName parameter works fine, however on the date parameter, it behaves weird. 

The date field inside ADX is of type string (yyyymmdd) which I am converting to date data type (dd-mm-yyyy) inside Power BI. This Power BI file is embedded in a portal which also accepts date filter in date format (dd-mm-yyyy) & internally filters Dim_Date inside PBI.

When I invoke the function will null values, the func returns total aggregated output, however if I try to filter with Date column in Dim_Date (which is bound to date parameter inside function), the function returns no rows. If I explicitly type-cast inside function definition, the output doesn't get filter with any selection.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Not enough info, but if you are concatenating a null text value to any other value, the new value will be null. You need to account for the nulls, like

     

    each if [Date] = null then ""&[companyName] else [Date]&[companyName]

    Any text value & null results in null.

     

    --Nate