How to display the same question on a dashbord with different filter?

Hello

Is it possible to have a single question like

select count(*) from ABC where {{status}}

And in the dashboard displaying the count twice with different values for status ?
Ideally I don't want to have a "public" filter in the dashboard. I want to set the status field on the count display.

In reality my query is more complexe and I would avoid to have the same sql query in multiple question for maintenance.

Hi, is it possible for you to use a different visualization type that allows you to show status, count in a single question?

Status Count
Red 1
Green 2

If you don't want a visible filter, you'd just enter your status values in the query like this:

select status, count(*) 
from ABC
WHERE status IN ("Red", "Green")

Let me know if that's what you were looking for :slight_smile:

I don't think this will help me

If the request return

Status Count
Red 1
Green 2

Then how can I choose to display Red or Green in a dashboard widget ? My guess is that the result in table format will impact the available display widget for the query

My goal is to have a query with parameters and specify a parameter for widget A and another params for widget B. And I have only one query to maintains.
i.e. instead of using a dashboard filter to input parameters into a query, just put a parameter "harcoded" into the widget config

Sorry, are you saying that you want to have one query that will update multiple tiles on a dashboard?

As in, when you say "dashboard widget", do you mean the tiles or cards on a dashboard?

I think you may be looking for models, if that's the case :slight_smile: Check out the model documentation and let me know if that's what you want.

Thanks for the answer

As in, when you say "dashboard widget", do you mean the tiles or cards on a dashboard?

yes a tile or a graph or a gauge. Anything on this page basically Visualizing data

models look promising. I tinkered with them a bit but in the end I used sql snippets

It works and I have one huge query with multiple display on dashboard.

However, it's a bit frustrating to write a new question just to wire up a parameter while on the other side we have a nice UI for dashboard parameters