Django Aggregation – Expression contains mixed types. You must set output_field
By output_field Django means to provide field type for the result of the Sum. from django.db.models import FloatField, F total_group=Sum(F(‘total_sold’)*F(‘final_price’), output_field=FloatField()) should do the trick.