Counting Unique Data Sets

ChefDonald

New Member
Joined
Mar 23, 2020
Messages
12
Office Version
  1. 365
Platform
  1. Windows
I have four years of Purchase Order data with each year containing 4,000-5,000 lines. I need to count the unique number of Purchase orders EACH Week of Each year. Some purchase orders are listed once (ordering one item) but others are ordering more than one item thus listed in the flat file multiple times in each & every week per year. I need to count the actual number of different Purchase Orders per week per year for last four years.
I do have separate fiscal weeks by year in columns that I can utilize to separate data by week by year
small sample:
1585019353094.png
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Maybe something like this:

Book1
ABCDEFGHI
1OrderFWODCust#POWeekYearCount
211/2/201933961120195
311/2/201933961220192
411/2/2019110084402120202
511/2/2019110084403
611/2/2019110084404
711/2/2019110084405
821/7/2019123
921/7/2019145
1021/7/2019123
1111/2/2020456
1211/2/2020456
1311/2/202058
Sheet1
Cell Formulas
RangeFormula
I2:I4I2=ROWS(UNIQUE(FILTER($E$2:$E$13,($B$2:$B$13=G2)*(YEAR($C$2:$C$13)=H2))))
 
Upvote 0
another way with Power Query

OrderFiscal WkOrder DateOust NoOust NameFiscal WkYearCount
914151102/01/20192817TOP TAYLOR IMPORTACAO120195
914151102/01/20192817TOP TAYLOR IMPORTACAO220191
914301102/01/201968022Chinese EXPRESS INC
914302102/01/201968022Chinese EXPRESS INC
914303102/01/201968022Chinese EXPRESS INC
914304102/01/201968022Chinese EXPRESS INC
914305208/01/201964801Kitchen SUPPLY CHAIN SOL.


Rich (BB code):
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Year = Table.AddColumn(Table.Distinct(Source), "Year", each Date.Year([Order Date]), Int64.Type),
    Group = Table.Group(Year, {"Fiscal Wk", "Year"}, {{"Count", each Table.RowCount(_), type number}})
in
    Group
 
Last edited:
Upvote 0
Maybe something like this:

Book1
ABCDEFGHI
1OrderFWODCust#POWeekYearCount
211/2/201933961120195
311/2/201933961220192
411/2/2019110084402120202
511/2/2019110084403
611/2/2019110084404
711/2/2019110084405
821/7/2019123
921/7/2019145
1021/7/2019123
1111/2/2020456
1211/2/2020456
1311/2/202058
Sheet1
Cell Formulas
RangeFormula
I2:I4I2=ROWS(UNIQUE(FILTER($E$2:$E$13,($B$2:$B$13=G2)*(YEAR($C$2:$C$13)=H2))))
Thank you AHOY...Will give it a shot
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,977
Members
449,200
Latest member
Jamil ahmed

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