Multi-frame Time Series switch order on each update

Hello,
I am using a “Source panel” with this query, containing all the data I need for the other panels:

SELECT
    $timeSeries AS t,
    SUM(_sample_interval * double1) / SUM(_sample_interval) AS clients,
    SUM(_sample_interval * double2) / SUM(_sample_interval) AS maxClients,
    SUM(_sample_interval * double3) / SUM(_sample_interval) AS cpu,
    SUM(_sample_interval * double4) / SUM(_sample_interval) AS memory,
    -- and others
    blob1 AS name

FROM SERVER_METRICS
WHERE $timeFilter AND index1 IN ($serverId)
GROUP BY name, t
ORDER BY name, t

Resulting in a table like this:

In another panel, I’m using as “Data source” the previous panel. I’m then using 3 transformations to plot only the data related to the “memory” column.

The “Source panel” data is ordered by name (DE_01, DE_02, IT_01…) and I would like to keep the order in this new panel.

What is happening instead is that each time the data changes, the plot order (and the labels order alike) changes depending on the time of the first rows, instead of the name.

image

The order is wrong (IT_01, DE_02…) and changes each time the data changes.

I have tried adding a “Sort by” transformation, but the “name” column is already sorted correctly.

Is there a way to keep the alphabetical order of the column “name” using the Source panel?

1 Like

bump please, I can’t find a way to visualize the query

Hello, any news on this? It seems the Sort By Transformation acts only on the current frame. Is there a way to sort the frames?

I managed to solve it by transforming the data. Add these transformations in this order:

  1. Merge series/tables so that the multiframe dataset becomes one single table
  2. Sort by the field of interest
  3. Prepare rime series with Format: Multi-frame time series