No "ALIAS BY" when using flux?

I’m only doing my first real Flux queries this week, so I won’t claim to understand how this works.

But… It seems that _field is not actually relevant? I used your example to get my panel to work – thanks!!! – and then tinkered and… this worked, too:

 |> map(fn: (r) => ({
      r: r._time,
      c: ${some code to generate the legend label string},
      v: r._value
    })
  )
  |> pivot(rowKey: ["r"], columnKey: ["c"], valueColumn: "v")

:man_shrugging:

You can also use a transform of the type “Rename by regex” to solve this for multiple signals in one query.
Simply create a regex that catches the name you want as a capture group, so you can use the replacement variable $1.

In the first screenshot you see the typical crazy names that we get out of the query.
The second one shows the transform and the result.

4 Likes