Questions with Variables not showing on Dashboards


#1

Are you able to add questions with native sql and using a variable directly to a dashboard. This doesn’t seem to work for me.

Thanks,
Eddie


#2

Some screenshots would be helpful. It’s not something I’ve ever had a problem with.


#3

Andrew - Great suggestion… a pictures worth 1000 words

My questions involves writing my own sql query which I then use the variable function with.

When I add that question to the Dashboard it says there is a problem displaying it


#4

Looks like your dashboard page in the second screenshot does not have filter input boxes for the variables (add then using the funnel icon) so your question does not get those set.


#5

Also, you may try to encapsulate your variables with [] like

WHERE 1=1
[ AND (lower(“name”) like lower({{Server_Name}}) ]

This way your query will run without the parameters. At least you can see some data to tweak.

I use SQL Profiler to get the complete query which Metabase has produced on SQL Server. You may try it if you are also using SQL Server.