INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Request: GroupSummary() Summation instead of Average  (Read 499 times)

wstreit

  • Recent member
  • *
  • Posts: 5
Request: GroupSummary() Summation instead of Average
« on: August 03, 2023, 05:52:25 am »

Unfortunately, the groupsummary() function always returns the average for user-defined fields, not the summation. Of course I can multiply the average with groupcount() for summation. Due to the rounding to only 2 digits after dot for datatype=[number] fields, the result is imprecise with large amounts of files.

A summation instead of an average of the groupsummary() function for custom fields would be much more practical. The average can be calculated at any time with groupcount().

Of course, it would be even better if the calculation type could be selected.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Request: GroupSummary() Summation instead of Average
« Reply #1 on: August 07, 2023, 08:29:38 am »

This is kind of a tricky request.  We have some fields that map to sum or maximum, but any unknown numeric field uses average.

As a start, let's try this change:
Changed: Expressions that output an average use three decimal places instead of one.

Then you should be able to do the math at least.

Thanks.
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up