Goal: make calculations over gain_loss field and create a view in table/s format like this:

Daily basis
Sum positives: 1000
Sum negatives: -3000
Sum positives / Sum negatives ratio: 0,33
Max positive: 1300
Max negative: -2000
Avg: 200
Monthly basis
Sum positives: 3000
Sum negatives: -6000
Sum positives / Sum negatives ratio: 0,5
Max positive: 2000
Max negative: -3000
Avg: 700

Looks like you might be indexing a number as a string — this will make math difficult to impossible.

Create two visualizations when trying to compare two time periods then you can compare them side-by-side in a dashboard

To find “positives” and “negatives”, use Filters or Filter Ratio . For example, Max(gain_loss) with a filter gain_loss>0 would be max positives.

You can setup time filters in the table itself or in the dashboard you can change the time range for individual panels (independent of the global time range)

Edit: Previously this comment said it wasn't possible but on second thought you should be able to with the above tips!

yes i used filter ratio to achieve this but what is really a pain is to create a table with all the calculations to add it in a dashboard. What about the view? I've tried TSVB and markdown but you can only add two calculations.

gain_loss is a numeric field

View 1 (statistics over the field gain_loss in a daily basis)

Sum positives: 1000
Sum negatives: -3000
Sum positives / Sum negatives ratio: 0,33
Max positive: 1300
Max negative: -2000
Avg: 200

View 2 (stats over the field gail_loss in a monthly basis)

Sum positives: 1000
Sum negatives: -3000
Sum positives / Sum negatives ratio: 0,33
Max positive: 1300
Max negative: -2000
Avg: 200

No way to add more than too calculations with TSVB.

maybe i have to abandon kibana for visualization. I think kibana is very limited when you want to make a dashboard a bit more sophisticated. I need to make computations over the series like R or Python way, drawdowns, ratios, monthlies, dailies.

Any ideas to face this with kibana or alternative to replace kibana?

Maybe not efficient to create this out of kibana because i have to read the whole data when a new data point arrives, but i don't know how to make computations on the fly with kibana.

What do you think?

Metrics and Calculates fields

How do you calculate metrics or fields based on document fields?, for example the drawdown. Did you make the computations befofe sending the index to elastic?. For example, make the calculations in a logstash pipeline.

I need to know the way to go with this kind of issues.

Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.