How does grafana choose which value to display

I send over metrics every 10 mins to get displayed on a grafana table panel. When I set the time to be the past 15 mins it displays the most recent metrics that got sent in the last batch.

When I set the time to be the past day however I can’t tell how it decides which metric gets to be the cell in the table. Based on what shows up in the cells it seems to be a mix of different metrics from different times throughout the chosen period.
In the raw table format I can see all the different metrics but when I group to a matrix it chooses one and I can’t figure out what it uses to do so. It seems random but I’m sure there’s some way it decides.

What backend is the data being sent to?
Mysql, postgres?

We use MetricTank for the data

It depends on the query and transformations… you can use sort transformation on grafana to sort by time first and then do the grouping, also in the group you can select min max last, last not null etc…

When using group to matrix I can’t choose what to select but I’ll see what impact sorting has on what gets chosen

What do you mean by what gets chosen?

Grafana chooses whatever fields you have indicated you want in the query for the specific data source