
For example:
=GROUPBY(Table1[Invoice Date]-DAY(Table1[Invoice Date])+1, Table1[Amount], SUM, 0, 1)
where Table1 is the name of your table.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I receive Sales and Invoice summaries in an Excel table. I would like to summarize the results by the month of the Sale or Invoice using GROUPBY and PIVOTBY.
The source table presents the date of each Sale or Invoice on the day it occurred so to use GROUPBY and PIVOT by I must create a new EOMONTH column for each Sale and Invoice event that GROUPBY and PIVOTBY use to summarize by month.
Is there a way to group rows by the Month and Year of each Sale and Invoice transaction without creating a helper column?
My source table before I add the helper column is:
The output of the above table using GROUPBY should be like below (or any other date format so long as months are summarized):
Look forward to your help.
Mike
For example:
=GROUPBY(Table1[Invoice Date]-DAY(Table1[Invoice Date])+1, Table1[Amount], SUM, 0, 1)
where Table1 is the name of your table.
Hi,
In cell E2, enter this formula
=LET(id,A2:A7,DROP(GROUPBY(HSTACK(YEAR(id)&TEXT(id,"mm"),TEXT(id,"mmm-yy")),C2:C7,SUM),,1))
Hope this helps.