From the guide, I can see aggregation being used with date fields. It's not working when I apply it with other integer/decimal fields. For example:
include ReportsKit::Model
reports_kit do
aggregation :total_salaries_by author, [:sum, 'authors.salary + staffs.royalty']
Both salary and royalty are decimals.
From the guide, I can see
aggregationbeing used with date fields. It's not working when I apply it with other integer/decimal fields. For example:Both
salaryandroyaltyare decimals.