i use kibana 7.7.0
i want to calculate the occupancy rate in hotels: i have 5 documents in my index:
occupancy rate % = (sum of soldrooms)/ (sum of available rooms)
first : i create two scripted fields "sold-rooms" and "available-rooms":
sold-rooms = doc['rooms.rates.availability.vendu'].sum()
available-rooms = doc['rooms.rates.availability.dispo'].sum()
they works fine and i test it in discover.
then i create a TSVB visualization to calculate the "occupancy rate" with the "filter ratio" but don't get any result .
i need help please !