Sum of max value over time interval

I have

color        total_value    @timestamp
red              90                X
red              90                X
blue             80                X
yellow           70                X
red              90                X
blue             80                X
yellow           70                X+1
red              90                X+1

what I need is sum(max of each color) = 90+80+70
I want to draw line of this value over time. how do I achieve this in kibana?

Hi @elasticforme
What version?

In short
Lens
Line
max (total_value)
Break down by color
In the break down look for collapse by sum

1 Like

currently using 8.5.3

Hmm I don't know if that collapsed by is in 8.5.3 Lens

If not, you will need to use TSVB

Max total_value
Group by color
Series agg sum