Home > Blockchain >  How to get month wise sum of data in a table
How to get month wise sum of data in a table

Time:02-01

I have date in one column and data in another from jan 2017 to Dec 2022. I want to find sum of data month wise. attaching file. Currently doing it manually. Any work around, array or something. Help.

enter image description here

CodePudding user response:

You can try with a QUERY like this:

=QUERY({INDEX(EOMONTH(A:A,0)),C:C},"SELECT Col1,Sum(Col2) where Col2 is not null group by Col1 format Col1 'MMM-YYYY'",1)

CodePudding user response:

within sheets you can try:

=QUERY({INDEX(IF(LEN(A9:A),EOMONTH(A9:A,),)),C9:C},"SELECT Col1, SUM(Col2) Where Col1 IS NOT NULL GROUP BY Col1 LABEL SUM(Col2) '' FORMAT Col1 'MMM YY'")

enter image description here

  • Related