Chained variables in case of using Azure Data Explorer (ADX) as Data source

  • What Grafana version and what operating system are you using?
    Grafana 8.5.2 on a Windows Server 2019.
    My database is Azure Data Explorer (ADX). So, I am using the KQL query language.

  • What are you trying to achieve?
    I have defined some Chained variables and they are all good. However, the query fails when I switch any of the variables from the single selection mode to the Multi-value mode.
    In addition, when I change a top-level variable, the dependant variables to that don’t work either.

  • How are you trying to achieve it?
    This is the query of the Dashboard.
    (Scada_t002 | project ValueAsReal , Metadata_Units ,RecordTime , Meta1=Metadata_FullNameDelimited_1 , Meta2=Metadata_FullNameDelimited_2 , Meta3=Metadata_FullNameDelimited_3
    | where $__timeFilter(RecordTime)
    | where Meta1 == case(’$Meta1’==‘None’,’’,’$Meta1’)
    | where Meta2 == case(’$Meta2’==‘None’,’’,’$Meta2’)
    //| where Meta3 == case(’$Meta3’==‘None’,’’,’$Meta3’)
    |where Metadata_Units == case(’$Unit’==‘None’,’’,’$Unit’)
    | order by RecordTime asc)

This is the query for the top-level variable
(Scada_t002
| extend SystemName = case(isempty(SystemName)==true, ‘None’, SystemName)
| summarize by SystemName)

and this one is the dependent variable.
(Scada_t002
| where SystemName ==’$SystemName’
| extend Metadata_FullNameDelimited_1 = case(isempty(Metadata_FullNameDelimited_1 )==true, ‘None’, Metadata_FullNameDelimited_1 )
| summarize by Metadata_FullNameDelimited_1 )

  • What happened?
    The query returns nothing. Moreover, the dependant (subsequent) variables return nothing as well.

  • What did you expect to happen?
    I expected that the query would understand multiple values in a Parameter (variable).

I also tried to use (in~) instead of (==), but it didn’t work either.

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

No data is retrieved for the main query and the queries in the subsequent variables.

  • Did you follow any online instructions? If so, what is the URL?

I tried to change the query from (==) to (in~) but it didn’t help out.