Forum Discussion

DennesTorres's avatar
DennesTorres
Power Participant
2 years ago

KQL Query not accepted by alerts

Hi,

 

I have the KQL query below. This query is not being accepted for alert creation.

 

pusummary
| where Window_End_Time > ago(20m)
| where TotalRides >5
| where PULocationID in (pusummary 
    | where Window_End_Time > ago(20m) 
    | where TotalRides >5 
    | summarize TotalRides=sum(toint(TotalRides)) by PULocationID
    |top 5 by TotalRides)
| summarize TotalRides=sum(toint(TotalRides)) by Window_End_Time=bin(Window_End_Time,2m), PULocationID

 

I think I understand the limitations of data activator (https://learn.microsoft.com/en-us/fabric/data-activator/data-activator-limitations#supported-real-time-dashboard-tiles ), but I can't understand which one of the limitations this query is breaking.

 

Any suggestions ?

 

 

4 Replies

  • You are already filtering your IDs.  No need to filter them again

     

    pusummary
    | where PULocationID in (pusummary 
        | where Window_End_Time > ago(20m) 
        | where TotalRides >5 
        | summarize TotalRides=sum(toint(TotalRides)) by PULocationID
        |top 5 by TotalRides)
    | summarize TotalRides=sum(toint(TotalRides)) by Window_End_Time=bin(Window_End_Time,2m), PULocationID
    • DennesTorres's avatar
      DennesTorres
      Power Participant

      Hi,

       

      I can remove the 

      | where TotalRides >5


      But I can't remove the filter by window_end_Time, otherwise it show to me the values for the top 5 Ids for all the time available.

      Anyway, none of these options enabled the "Set Alert".

       

      Kind Regards,

       

      Dennes

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi DennesTorres ,

    When you mouse over the Set alert icon, you will be prompted as to why you are not allowed to create an alert, please check what the system prompt is?

    Also, please contact your organization's global administrator to see if this option is Enable in the tenant settings in the Admin portal:


    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • DennesTorres's avatar
    DennesTorres
    Power Participant

    Hi,

     

    The suggestion about hovering the mouse helped a bit.

     

    The error message is complaining the query has two time ranges.

    Do you suggest something I could do for this query to work, or is this a bug, because the subquery shouldn't be recognized as a 2nd time range ?

     

    Kind Regards,

     

    Dennes