Chartjs-How to Sum values from different objects in Django?

2๐Ÿ‘

โœ…

I hope this will give you the expected result,

result = Exercise.objects.filter(
    workout__member=request.user.member
).aggregate(
    total=Sum(F('reps') * F('series') * F('weight'))
)

Leave a comment