TSVB Markdown to show sum of variables

Hi guys,
I have some problem with using markdown on TSVB: I would like to show a simple KPI (i.e: 1200) but this number should be a sum of 2 variables.
In my documents I can select two filters:

  1. variable_1 (filter field AA == "hello") => 1000 docs
  2. variable_2 (filter field BB == "hi") => 200 docs.

In my markdown I would like to show 1200 as the sum of variable_1 + variable_2. Do you know if it's possible? I'm trying to use also Vega... but it's a little bit complicated. Please help me :frowning:

Hi @Ely_96 Depending on what version you are on I think you can do this pretty easy in Lens with a Metric and a Formula

count(kql='fieldAA: "hello" ') + count(kql='fieldBB : "hi" ')

Here is an example I did with some metrics fields
You can change the Label Name,

Starting 8.1+ You can color etc....

2 Likes

Hi @stephenb thank a lot for your help!! I'm using Kibana 7.16.2 and yes, I found Metric > Formula (and it works fine). For me isn't important to set colors or background.

Thanks!!! :slight_smile:

1 Like

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