Handlebar Helpers in TSVB Markdown

Hi Team,

I want to add some Handlebar helpers like below. So that i can use it in TSVB Markdown. I need to use it for calculate difference between the two count values. @tsullivan @devon.thomson @bhavyarm Help required.

Handlebars.registerHelper('difference', function (val1, val2) {
    return val1-val2;
})

It's not possible to add custom helpers to markdown. However, to calculate a difference you should be able to use the "math" aggregation in the data tab

Math wont work between Layers.. I want show count of this Month , Count of Previous Month and Difference between counts. Can you pls help on it

Good point, that's not possible in TSVB. Lens formula allows to do calculations across different time ranges - see Analyze time series data | Kibana Guide [8.1] | Elastic

However, you can't use it together with Markdown yet - if a regular metric vis works for you too then that might be an option.

If i do math calculations like {{ subtract previous_count thismonth_count}} in Markdown handlers it would be better.

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