Help with a visualization

I have a simple visualization in a dashboard. X-axis is the @timestamp. Y-axis is a MetricValue of a service. I want to add another visualization (another graphic) with the same X-axis. Here, the MetricValue for each @timestamp has to be the average value of the MetricValue in the last 3 weeks for that @timestamp.
In other words, for example, if @timestamp is 28-03-2022 12:30, the MetricValue I want to visualize is (MetricValue(@timestamp=21-03-12:30) + MetricValue(@timestamp=14-03-12:30) + MetricValue(@timestamp=07-03-12:30))/3 . I don't know how to carry out this.

Can anyone help me ? I would be very grateful

Hi @edu_perez_alvarez,

so the only difference between the panels are different time ranges? You could customize the time range in a single visualization in your dashboard:

Here's the two visualizations side by side:

If using Lens, there's also a useful feature of timeshift if the solution above doesn't satisfy your needs. Let me know!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.