Using math in Kibana visulisations

Hello, I have a bit of a weird thing to ask here. We have a system where customer by buying products gets stars, after the user has 6 stars he can use them for a discount.

We log every time the user gains a star in Kibana, we also log how much stars he has at the moment user has gained one. I need to make a chart that displays how many users we have that have :
1 Star 3 Stars 5 Stars
2 Stars 4 Stars 6 Stars

But when I do that I notice the visualization also counts the user that has 5 stars as if he also had 1,2,3,4 (because the log still exists), is there a way for me to subtract from the 1 star total all of the other star totals so that I get correct data ? If you need further info I will share to you the logs.



I think maybe a derivative aggregation, spliting the bucket by stars and sorting them from min to max.
This way you would display users that have each number of stars. It would show 1, nubmer of users that have 2 but not 1, number of users that have 3 and not 2.
Can you try with that and let me know if it works?

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