Divide Series by Count all Records in same index

Hello, as a noob, How to divide one Series by “Count” of all Records within the same index*?
Closest information found here https://www.timroes.de/2017/08/02/timelion-tutorial-from-zero-to-hero/

Thank you!

Hi,

basically you just put a .divide(.es(..)) behind your series. So for example:

.es(index=ind, q=somefield:value, timefield=time).divide(.es(index=ind, timefield=time)).label('Blue').color(blue)

Will devide all documents matching that query, by the number of all documents in ES for that specific time slot.

Does this help solving your problem?

Cheers,
Tim

Hi Tim,

Thank you for checking this out. Perhaps a punctuation error?

Thank you,

Mark

I think you forgot the closing parenthesis for the .divide function and just have one for the .es function, but unfortunately that part is blacked out in your screenshot, so I can only guess :slight_smile:

Yes, closing parenthesis was the issue.
Thank you!

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