Consolidate columns date values into a report as per period considering category variable

Luthius

Active Member
Joined
Apr 5, 2011
Messages
324
Hello guys
I need to consolidate values distributed underneath columns represented by Days.

I just need the consolidation of these values by Category as per period (Week, Month and Year).
Due the quantity of information in my file, using a formula is not feasible. The file has +2k columns and +27k rows.

Column AColumn BColumn CColumn DColumn EColumn FColumn GColumn H(...)
IdCategory01/0101/02/202001/03/202001/04/202001/05/202001/06/2020(...)
1A$124$230$31$43$21$190$
2B$250$18$35$178$420$221$
3C$30$75$470$12$340$110$

I tried using pivot tables, but it recognize the column dates as a field instead as a date.
The final report will be something like below. Where the first column either is Week or Month as per year.

YearCategory ACategory BCategory C
Wk#1$$$
Wk#2$$$
Wk#3$$$
(...)$$$
 
Please see post 19. I suppose i have have solved your probelm for dates. Please check it
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
you didn't show what exactly you want to achieve
btw. year month and week you can create directly from Attribute column without duplicate this column
 
Upvote 0
you didn't show what exactly you want to achieve
btw. year month and week you can create directly from Attribute column without duplicate this column
Really? I thought we can only do it an once. We cannot have the 3 different ones (Year/Month/Week) without duplicating some column. How to do that?
 
Upvote 0
Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Category"}, "Attribute", "Value"),
    #"Parsed Date" = Table.TransformColumns(#"Unpivoted Other Columns",{{"Attribute", each Date.From(DateTimeZone.From(_)), type date}}),
    #"Inserted Year" = Table.AddColumn(#"Parsed Date", "Year", each Date.Year([Attribute]), Int64.Type),
    #"Inserted Month Name" = Table.AddColumn(#"Inserted Year", "Month Name", each Date.MonthName([Attribute], "en-US"), type text),
    #"Inserted Week of Year" = Table.AddColumn(#"Inserted Month Name", "Week of Year", each Date.WeekOfYear([Attribute]), Int64.Type)
in
    #"Inserted Week of Year"
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,921
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top