Merging Label colums


I’m trying to graph some data I get returned from an SQL query.

The table result looks like this.

What I’m basically trying to achieve is a line graph with Status code and the Service as the label, and Counter as the value, over the Time in the series.

I cannot figure out how to apply the transformations to make this work.

As a bonus, I’d love for services with the same name to have similar colours.

Kind regards