Hi all,
I have data from a query that looks like this:
AV: 1
AW: 2
BV: 3
BW: 1
CV: 4
CW: 2
I want to put it in a table so that it looks like this:
V W
A: 1 2
B: 3 1
C: 4 2
Is it even possible with grafana transforms? I’m not able to change the query.
Hi,
Is AV
a single string? Can you share a table view of your current data? Are those always two letter strings? If so, you can go like this (the string column is named name
and the number value
:
- (1st transformation) We copy the same field
- (3rd transformation) We get only the first letter from the string
- (4th transformation) We get only the second letter from the string
- (6th transformation) We group our three columns to matrix using Second letter as column, First letter as row and number as value.
Hope that helps!