- What Grafana version and what operating system are you using?
What are you trying to achieve?
have a column count of the status field as it’s own column
postgres table data example as below
client=clientA, status=complete, created_at=1234567890
client=clientB, status=incomplete, created_at=1234567890
client=clientA, status=incomplete, created_at=1234567890
displayed in table as
client complete incomplete
clientA 1 1
clientB 0 1
How are you trying to achieve it?
closest I got was
select client, status, count(status) as total from ( select created_at, client, status from tbl_clients where $__timeFilter("created_at") order by "created_at" ) e group by e.client, e.status
- What happened?
I have a multiple rows for the same client with the status per row
- What did you expect to happen?
need to rotate the status value (complete,incomplete) to be a label with a count so one line for the client with the status values as a column.
- Can you copy/paste the configuration(s) that you are having problems with?
select client, status, count(status) as total from (
select created_at, client, status
order by “created_at”
) e group by e.client, e.status
- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
no, just not the output I want but closer
- Did you follow any online instructions? If so, what is the URL?
similar problem but using table Table-like visualization with label values as row values and column names