How to display two tables in one panel

I want to make two completely different queries to Postgres in Grafana six, and the output of these two queries will be two completely different tables. But I want to finally display both of these tables in one panel! in such a way that the viewer can decide which table to have in the panel by choosing the values of the variables that are placed on the top of the dashboard.

1 Like

Hi @zahrazare313

Do both tables queries have the same datasource i.e. PostgreSQL?

If this is correct, then maybe check out how to use JOIN to get the data.

If this is not the scenario then please explain a bit in more detail so that the community can help you out.

Hi @usman.ahmad, Yes, the data source of both is Postgresql. Actually, I have two tables in two different dashboards, I have been asked to have these two tables in one panel, so that the user can decide which table to display in the panel by selecting the values from the variables that are placed on the top of the dashboard. I hope I have been able to convey what I mean.

Dynamic query might be best route or even better use a stored procedure, pass the variable to proc and select different table based on that

thank you. Can you help me further?

1 Like

Dont ask if you can ask for help, just ask. That is the purpose of this forum

1 Like

My question was answered in detail in this topic

1 Like