Extracting monthly totals per customer

FrecklePaw
2StarLounger
Posts: 130
Joined: 12 Aug 2020, 08:40

Extracting monthly totals per customer

Post by FrecklePaw »

Hello,

I have some financial info from various different customers, which has been input into a spreadsheet with each individual purchased item input. However, I need to extract only the monthly totals for all items purchased for each customer (i.e. not itemised but a total for all).

BUT there is over 14 months' worth of data (and several customers!) so I am looking to find a way to shorten this exercise quickly without having to manually do too much or, worse, have to manually input each month's total myself. Is there a function or method to quickly extract this data and alter the existing sheet without also having to do too much backwards and forwards (i.e. cut and paste into another new sheet, etc.)?

TIA,
FP

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Extracting monthly totals per customer

Post by HansV »

Shouldn't this be in the Excel forum?

Could you attach a small sample workbook (without sensitive information)?
Best wishes,
Hans

FrecklePaw
2StarLounger
Posts: 130
Joined: 12 Aug 2020, 08:40

Re: Extracting monthly totals per customer

Post by FrecklePaw »

Ah! Sorry yes - I had thought I had clicked on the Excel one! I will move it over to there now.
I can send a screenshot meantime - will organise to send...

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Extracting monthly totals per customer

Post by HansV »

I have moved this thread from the Word forum to the Excel forum.
Best wishes,
Hans

User avatar
hamster
StarLounger
Posts: 58
Joined: 10 Mar 2021, 22:57

Re: Extracting monthly totals per customer

Post by hamster »

You were asked about Excel example not a screenshot

anyway you can try Power Query : Group by month and Sum to MonthTotal

robertocm
Lounger
Posts: 43
Joined: 07 Jun 2023, 15:34

Re: Extracting monthly totals per customer

Post by robertocm »

Here an example using ADO:
Libro1.xlsm

User avatar
hamster
StarLounger
Posts: 58
Joined: 10 Mar 2021, 22:57

Re: Extracting monthly totals per customer

Post by hamster »

Power Query
(however you can use Pivot )

Code: Select all

// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Month = Table.AddColumn(Source, "Month", each Date.Month([Date]), Int64.Type),
    Grp = Table.Group(Month, {"Person", "Month"}, {{"MonthTot", each List.Sum([Sales]), type number}}),
    Asc = Table.Sort(Grp,{{"Month", Order.Ascending}})
in
    Asc
pqtot.png
excel file contain extended version
You do not have the required permissions to view the files attached to this post.