How to create a new visualization based on an existing saved visualization in kibana?

Hi ,

As an example : There is a visualization which shows number of customer per day
In the dataset , there is filed which contains the price of purchased item.
Now , we have plan to create a bar chart to show total (average) of sales per number of customer per day.

How can we handle this issue?


Is your existing visualization (the one that shows number of customers per day) also a bar chart?

Yes, it is.
Is it possible to do that?
How about other type of visualization (metric,..)?
can I create a bar chart based on a metric visualization?

Thank you so much for your response

Replace rx-bytes with your price field field and src-ip with your customer name field. You can use the same approach with bar, line, pie charts to combine data into one visualization.

Yes, open up your existing bar chart visualization, make the necessary changes to it (as @anhlqn suggested) and save it with a different name . That will create a new bar chart visualization.

Unfortunately , It didn't work.
In this solution ( anhlqn's solution) , we have a bar chart that shows total sales for each customer per day. But I want to show total of sales per number of customers (Unique count of customers) per day.

Actually I taught maybe I can create a bar chart which shows unique count of customers per day . And as the second step, create a new bar chart which indicates total of sales per number of customers per day.

I applied the suggested method by anhlqn. But as you can see in the picture, it shows sum of sales per each available customer individually per day.

So I guess what you want is average revenue per customer over time - daily interval (Sum of sales amount divides by total of customers for a day). I don't think that native Kibana visualization can do it. You may have to try scripted fields or write query to get both sum of sales and total customers for each day, compute the average, and send back to another index for visualization.

That is exactly what I am looking for.
Would you please advise me how to do that with scripted fields? ( I guess I can not use "query" along with "cardinality" aggregation in scripted field in order to count number of customers of a day)

Unfortunately, I don't know a lot about scripted fields. I guess scripted field apply on a per event basis, but in you case you want a sum of sale prices / a unique count of customers, which I have no idea if it is doable in scripted fields.