Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We should support basic aggregation functions for multivalue fields like checkboxes or multiselect. The following functions would be required at a minimum:
- max()
- min()
- sum()
- ave()
- count()
This depends on #1958538: Improve math expression engine.
Comments
Comment #1
draenen CreditAttribution: draenen commentedComment #2
hfarrier CreditAttribution: hfarrier commentedWe need this feature also. We would like to calculate fields within a multivalue field (total of item) and then calculate all of the multivalue totals in another Math Field.
For example:
Multivalue field contains 2 fields that are multiplied and the total is automatically displayed in a Math Field within the multivalue field.
Another Math Field located outside of all of the multifields where the total of all multivalue Math Fields is displayed
Comment #3
hondaman900 CreditAttribution: hondaman900 commentedWas this ever addressed? Is it possible to use the Math Field to sum the values entered in a field that allows "add more" multi-line entries? For instance, I want the user to enter multiple amounts and have this field sum them to provide an on-the-fly total. I've tried numbers ways to access the indexed entries but can only access the value of index 0 - am I missing something?
I have a decimal field with "unlimited" entries. As user adds entries I need to display a running total of entered values.
Please advise if there's a math formula I can enter that will do this.