[State Timeline] Using first colonne from table as name for each row

Hello !
We have a database with values ordered like this
Task Name (varchar) | Status1 (datetime) | Status2 (datetime) | StatusX (datetime)

We import those datas into “State timeline” but we didn’t succeed to have for each task a state timeline with the name of the task in the left part of the graph and then a timeline showing each statut progress for each of those tasks.

Currently when we import our data, we have a timeline created with the task name and another with the status. Both of those timeline are named with the column from our table.
But our idea is to use the task name as a name foreach status timeline.
Like the “override” property would do for field/series name globally we want to do it generically by row.

Maybe we need to use some transformation data but until now we created all our graph without using them.

If anyone have an idea to achieve that kind of behavior in “state timeline” feel free to share your idea :slight_smile:

Welcome @amorel50 to the Grafana forum.

What is your datasource and can you share your query?

My data source is Microsoft SQL Server.

I tried to create it in multiple way but none of them worked.
The last one is a table with just :
ID | TaskStatus | DateBegin | DateEnd

So the request is quite straightforward but maybe we need to do something else…
We also tried with another table and PIVOT / UNPIVOT but the trouble was still the same.

SELECT t.Name, gbet.TaskStatus, gbet.DateBegin, gbet.DateEnd 
FROM dbo.GrafanaBeginEndTaskStatus AS gbet JOIN dbo.Tasks AS t ON gbet.ID = t.ID

Example of what we wanna achieve

With the example from my first post we tried to have 1 row per task in a table and one column per status (we have only 13 status possible for a task) which is a Datetime. And then just display them in the state timeline but we faced the same kind of issue.
We would be able to use the first column of our table as the name of a row in the state timeline. But we saw that each column must be a task name to make this possible which is impossible in our case because it will lead to an infinite number of column in our table which is “by design” something not very SQL friendly :confused: