I found a solution for this trouble but I don’t sure about is this best practice. I did like this. try add null value your query result and add a condition for that check null value. If you learn more about in clause click here.
You have to add your dashboard query extra null statement because postgresql doesnt bring null values when you queried like with
in $VariableA. You must add for your null values
or IDD."ColumnA" is null
I did it as follows.
(SELECT DISTINCT "ColumnA_desc" as __text, "ColumnA" __value FROM yourSchema."YourTable" D WHERE "ColumnA_desc" IS NOT null) union all (select ‘(Empty)’ as __text, ‘#####’ as __value
) ORDER BY 1 ASC
SELECT IDD."CreateTime" AS time, IDD."ColumnA" AS value, IDD."ColumnA_desc" AS metric FROM yourSchema."YourTable" IDD WHERE
when (’#####’) in ($VariableA) then IDD.“ColumnA” IN ($VariableA) or IDD.“ColumnA” is null
else IDD.“ColumnA” IN ($VariableA)