You can create aggregate properties to display the Sum, Average, Min or Max of properties of descendant cards, or Count of descendant cards in a card tree. Aggregate properties can be selected in MQL just like any other card property.
You can choose to apply an aggregate property to all of a card's descendants in the tree (All descendants), only descendants of a specific card type or a specific set of children based on conditional MQL query.
Aggregate properties use the project numeric precision to set how many decimal places are stored.
- The Sum and Average aggregates take a numeric card property name as an argument, and perform the aggregation on the values of that property for descendant cards in the tree.
- The Min and Max aggregates take a numeric card property name as an argument, and perform the aggregation on the values of that property for descendant cards in the tree.
- The Count aggregate does not take a card property as an argument. Instead it counts the number of descendants that the card has in the tree.
Aggregate properties ignore values of (not set), so the Average of [1, 3, 6, (not set)] is 3; and the Min of [1, 3, 7, (not set)] is 1;
Likewise, when an aggregation scope of All descendants is chosen, aggregate properties which take a property as an argument will ignore card types which do not possess the specified card property.
Aggregate property values are calculated by background jobs. An asterisk appears next to an aggregate property when the property is stale and the background job is till doing recalculation.