Grafana bar gauge multiple queries order by value

Hi,
i have a bar gauge dashboar that has multiple queries and i want to order them by value

It has multiple queries such as this:

All the data comes from influx.
I tried with the sort by transformation but it doesnt make sense for my case:

Quite a dirty solution involving several transformations, but could work for your case:

when i apply the first transformation i got just one query, i dont know why

Can you join those 2 queries using Join by field first then apply sort?

how do i do that? I have 8 queries

do they have a shared/common field you can use?

image

Maybe i have an older version cause i dont have that transformation :frowning:

Is there another way?

If it’s possible to redesign InfluxDB side, I would go that way. I.e. to store everything in one bucket, using different tags. And have only one query to get all measurements.

1 Like

exactly! @coricajuan5 your design approach is exposing you to this challenge.

  1. upgrade
  2. if not able to upgrade, each maquina should not be a separate bucket.