grafanagrafana-variablegrafana-dashboard

Grafana: Dropdown Variable is not selecting the particular values in Dashboard and Viz


I am having a Grafana Dashboard with Grafana Viz(TimeSeries), When I select particular value in dropdown, stil its showing all values in Grafana Viz.

Grafana Viz SQL Query:

SELECT DATE, impliedVolatility_OPT AS "-",symbol  FROM <db>.<tl>

Grafana Variable(Drop Down SQL Query):

SELECT DISTINCT CONCAT('- ', symbol) AS symbol FROM <db>.<table_name>;

Snap Attached: enter image description here

Once inspect query in Grafana Viz, Apply Panel Transformation is able to select dataframe of sql query in Multi Frame Transformation

But Varible is not working when selected particular value in Variable.

enter image description here


Solution

  • As in my SQL Table I don't have - added infront of symbols.

    Now I changed the variables and Vizulization query as below and DropDown is working now.

    Variable SQL Query for Dashboard:

    SELECT DISTINCT  symbol FROM <db>.<tl>;
    

    And VIZ Query:

    SELECT DATE, 
    symbol, impliedVolatility_OPT '-'
    FROM <db>.<tl>
    WHERE symbol IN ($Symbol)
    

    SNap: enter image description here