Hi all,
I would like to create a visualization of Line type using Lens that display the percentage of each terms.
The challange here is: in some documents, I have a field of type array with different values
So, as example, each document have a field called "timestamp" and another field called "color" and the values can be:
2023-10-18 22:01:00 | pink
2023-10-18 22:02:00 | red
2023-10-18 22:03:00 | yellow, red, blue, black, yellow, yellow
2023-10-18 22:04:00 | black, red, yellow
...
Remembering field "color" is an array, how can I create a line visualization using Lens that display the percentage in timeline ?
I've tried to create a lens visualizantion but the percentage value is wrong and i think it is because of array field. The formula i used in "vertical axis" was:
count(kql='color : *') / overall_sum(count(kql='color : *'))
ps.: i cant upload the image