You might want to use window functions

https://docs.djangoproject.com/en/3.0/ref/models/expressions/#window-functions

to calculate the sum per month.  Haven't personally used them yet though.

On 3/11/2020 8:27 AM, Mario Bisiani wrote:
Yes. I am using Chart.js. Any help?

Il giorno giovedì 5 marzo 2020 13:42:18 UTC+1, krnrrr ha scritto:

    what do you mean by "cumulative"? if we have aggregate sums like

    jan = 100
    feb = 150
    mar = 120

    you want to have output as

    jan = 100
    feb = 250
    mar = 370

    ?

--
You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com <mailto:django-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3bb00f84-7a7c-408c-9b17-8cdd51f7bb1f%40googlegroups.com <https://groups.google.com/d/msgid/django-users/3bb00f84-7a7c-408c-9b17-8cdd51f7bb1f%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/51e400a6-7869-ec4c-adaf-ff50e8919bfd%40linear-systems.com.

Reply via email to