Math in TSVB (and how to handle 0 in the denominator)

Some of my data for smaller time values may result in a divide by 0 error. At the moment, if this happens the whole visualization breaks and I can't see any columns even with correct data for that time period.

Is there any way to rewrite the math function so that it can handle this potential error but still display properly?

The current expression is:
divide(subtract(params.MaxA, params.MinA), subtract(params.MaxB, params.MinB))

You could use Lens formula to achieve what you want. Use ifelse function where you specify a condition. In the condition you can use eq function to compare the denominator to 0. Let me know if you need further guidance.

Hmm... Looks like that my version of Kibana doesn't include that detail in the Lens visualization. We're currently running v 7.8.1

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