[Database View] Broken List calculations in List v2


In List v2, you can configure list calculations for columns, which calculates column totals, minimums, maximums, and averages. In a list of records, right-click the header of a numeric column you want to evaluate with list calculations. Select Configure > List Calculations, and the list calculation window appears. 

The behavior reported here is specific to Database Views. The list calculation returns '0.00' as a result even when the list retrieves values bigger than '0.00'.



Comparing with an OOB instance we see the following behavior:

- Customer's instance:
<span class="aggregate_value" aggregate_type="SUM" aggregate_value="8.33333333" aggregate_field="pkg_u_monthly_cost" aggregate_display="£0.00">£0.00</span>

- In a OOB instance: 
<span class="aggregate_value" aggregate_type="SUM" aggregate_value="2799.9900" aggregate_field="pkg_u_cost" aggregate_display="£2,799.99">£2,799.99</span>


The issue here lies in records with an (empty) ID in the [fx_price] or [fx_currency] table:




Delete the records with an (empty) ID to fix the list calculations.

Note that it's safe to delete such records since they are orphan records (not referencing any existing record). 

Additional Information

For more information about List calculations, check the following documentation page: Documentation - List v2 Calculation