TSVB - visualizing the difference of two datasets

Hello Elastic-Community,

I get data like this:

Document 1:
Data.name: Total pieces,
Data.value: 60,
timestamp: 12:00

Document 2:
Data.name: Good pieces,
Data.value: 58,
timestamp: 12:00

Now I want to visualize the differenz of the two values (60-58 = 2) in a TSVB.

I tried to use the "Math"-Aggregation, but my problem is that the Data-Field of "Total pieces" and "Good pieces" are called the same.

Can I somehow define a filter for each aggregation, because then i could do it like this:

Aggregation 1: (Total pieces)
Average of Data.value
Filter: Data.name: "Total pieces"

Aggregation 2: (Good pieces)
Average of Data.value
Filter: Data.name: "Good pieces"

Aggregation 3:
Math
subtract(Totalpieces,GoodPieces)

Hey @LL_FED. Unfortunately, you can't do this on TSVB.
While you can filter your data, then it is not possible to do a Math aggregation.

You could do something like that:

I have used the sample datasets but it is easy to do the correlation with your data.

or you can create two different series and use the Panel Filter from the panel options tab but then again you can't use Math or Bucket script

1 Like

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