Average and Count metric in the same Vertical Bar

Hi guys!
I need to build a visualization like the one I'm attaching.


Suppose that I have an index with a field called countryCode. Also I have a timestamp field related to each document in the index

The first value in the graphic correspond to the count of occurrences of the countryCode X today.
The second value in the graphic correspond to the average occurrences per day of that same countryCode X in the previous 7 days.

Is it possible to do with a Vertical Bar?
In another case ... what other option do I have?

It's almost possible to do this in Kibana's basic bar chart, but we don't support configuring the moving average aggregation. It uses a window of 5 by default, which won't give you the 7 days you want. There is a GitHub issue for this that I've reopened.

However, there's another way! You can use TSVB to do what you want. You'll just need to configure two metrics, a simple count and then a moving average of the count with a window of 7. It would look like this:

Then in the "Panel options" tab you'll want to set the interval to 1d and specify the countryCode you want to filter on in the Panel filter input. That would look like this:

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