Total card is not displaying the sum of two metrics correctly as it aggregates them as a string instead of applying addition

When using the Bar Chart, I get this error of aggregating Sums as a String instead of adding them up as normal numbers.

I have also enabled this “Show total card” style in order to show these numbers.

Did anybody encounter this problem before? How did you fix it?

1 Like

Hey,

Hope you’re keeping well.

This usually happens in Looker when the underlying field types are defined as string rather than number in your LookML model. The “Total” card will concatenate string values instead of performing numeric aggregation. Check the field definitions in your view file and ensure the type is set to number (or the appropriate numeric type) and that measures use sum or another numeric aggregation. After updating the LookML, run a content validation and refresh the explore to confirm the totals calculate correctly.

Thanks and regards,
Taz