Difference between "params.<name>" and "params._all.<name>.values" in TSVB Math aggregation


Could someone please explain to me the difference between params.<name> and params._all.<name>.values in TSVB table visualization when using the Math aggregation? Based on the written definition I thought that params.<name> is a reference to the value in each bucket whereas params._all.<name>.values is an array made up of the values in all buckets.

For example if I have table of counts like this (split by sport type):

Sport, count
soccer, 10
basketball, 5
football, 12

I'd expect params.<name> to return the specific value of each bucket (which it does) and first(params._all.<name>.values) to return "10" (first element in an array of [10, 5, 12]). Currently there is no difference between the two results as both return the count for each bucket. What am I missing?

My ultimate goal is to try and find a way to compare values between buckets... for example find and set all counts to the largest count max(params._all.<name>.values) and in this case all buckets should show 12. However, it doesn't seem to be possible.


1 Like

Can you try using the script in a Bucket Script aggregation? I'm not sure the Math aggregation has access to all the buckets.

Is there a syntax to access the value of each individual bucket in Bucket Script? I am getting an error when using params._all.var.values:


1 Like

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