I have this strange behaviour:
I have set a variable to repeat panels in one dashboard ($zone_alias)
Whatever value of the variable I select, it’s working, but if I select more than one or “all”, it shows “no data” (so, either using multi-value option or not)
I’m struggling to understand why, as a similar code in the same dashboard instead works fine.
I am copying my code below, if you can kindly help:
Not working code:
SELECT day_hour as "time", hourly_passages, TO_CHAR(day_hour, 'HH24') as metric FROM (SELECT day_hour, SUM(gate_passages) as hourly_passages FROM (SELECT meas_start, date_trunc('hour', meas_start) as "day_hour", gate_passages FROM sensorio.gate_passages WHERE zone_id = (SELECT zone_id from sensorio.zone_aliases WHERE zone_alias = $zone_alias) AND gate_passages >= 0 AND EXTRACT(ISODOW from meas_start) NOT IN (6, 7) AND $__timeFilter(meas_start) ) x GROUP BY day_hour) y ORDER BY metric
SELECT meas_date AS "time", footfall AS "weekday footfall", TO_CHAR(meas_date, 'day') as metric FROM sensorio.footfall_by_zone_id_and_date WHERE $__timeFilter(meas_date) AND zone_id = (SELECT zone_id from sensorio.zone_aliases WHERE zone_alias = $zone_alias) ORDER BY EXTRACT(ISODOW FROM meas_date)