Excel Guides

How to Calculate Average Daily Inventory From a Change-Only Export in Excel

Main’s inventory export has three rows: 10, 0, and 20. The average of those rows is 10 units. The average over five calendar days is 8 units because 10 and 0 each remained in effect for two days.

A Microsoft Fabric Community question describes a warehouse export that writes a new starting balance only when the count changes. Entire dates disappear. If your export works this way, rebuild the daily series before adding warehouses or averaging inventory.

Build one row per item, warehouse, and day

Synthetic example. The report covers November 1–5, 2026, for item X at Main, West, and East. Each recorded starting balance stays in effect for that item and warehouse until its next change. Confirm this behavior and the completeness of the export first. A missing file from a daily snapshot job gives you no basis for carrying a balance forward.

Create sheets named Policy, Balances, Daily, and Review. In Policy!B6 and B7 enter the Excel dates November 1 and November 5, 2026. In Policy!D6:D8 enter X three times. In E6:E8 enter Main, West, and East in that order. Import these two CSV blocks into Balances and Daily with the headers in row 5, starting in column A. Confirm dates import as Excel dates and quantities as numbers.

Balances

Record ID,Item,Warehouse,Effective day,Starting units
B1,X,Main,2026-11-01,10
B2,X,Main,2026-11-03,0
B3,X,Main,2026-11-05,20
B4,X,West,2026-10-31,5
B5,X,West,2026-11-04,15
B6,X,East,2026-11-03,7

Daily

Item,Warehouse,Day
X,Main,2026-11-01
X,Main,2026-11-02
X,Main,2026-11-03
X,Main,2026-11-04
X,Main,2026-11-05
X,West,2026-11-01
X,West,2026-11-02
X,West,2026-11-03
X,West,2026-11-04
X,West,2026-11-05
X,East,2026-11-01
X,East,2026-11-02
X,East,2026-11-03
X,East,2026-11-04
X,East,2026-11-05

Find the most recent balance on or before each day

In Balances!F5 enter Input check. Enter the next formula in F6 and fill through row 11. It flags a missing balance, duplicate item/warehouse/date, or invalid source row for review.

=IF(OR(A6="",COUNTIF($A$6:$A$11,A6)<>1,COUNTIFS(Policy!$D$6:$D$8,B6,Policy!$E$6:$E$8,C6)<>1,NOT(ISNUMBER(D6)),D6<=0,D6<>INT(D6),NOT(ISNUMBER(E6)),E6<0,E6<>INT(E6),COUNTIFS($B$6:$B$11,B6,$C$6:$C$11,C6,$D$6:$D$11,D6)<>1),"Review","Ready")

In Daily!D5:G5 enter Prior records, Source effective day, Starting units, and Coverage. Enter these four formulas in D6:G6 and fill through row 20. Format E as a date. MAXIFS finds the latest effective day within the same item and warehouse. The prior-record count keeps a missing opening from becoming zero. The balance lookup preserves a recorded zero.

=COUNTIFS(Balances!$B$6:$B$11,A6,Balances!$C$6:$C$11,B6,Balances!$D$6:$D$11,"<="&C6)
=IF(D6=0,"Unknown",MAXIFS(Balances!$D$6:$D$11,Balances!$B$6:$B$11,A6,Balances!$C$6:$C$11,B6,Balances!$D$6:$D$11,"<="&C6))
=IF(COUNTIF(Balances!$F$6:$F$11,"Review")>0,"Review",IF(D6=0,"Unknown",SUMIFS(Balances!$E$6:$E$11,Balances!$B$6:$B$11,A6,Balances!$C$6:$C$11,B6,Balances!$D$6:$D$11,E6)))
=IF(ISNUMBER(F6),"Known",IF(F6="Review","Review","Missing opening"))
DayMainWestEastMain + West
Nov 1105Unknown15
Nov 2105Unknown15
Nov 30575
Nov 4015715
Nov 52015735

West carries its October 31 balance into November 1. Main’s November 3 zero remains in effect on November 4. East first appears on November 3, so both earlier days stay unknown.

Average the daily totals and check coverage

In Review!A19:A21 enter Main, West, and East. Enter the next four formulas in B19:E19 and fill through row 21. These return known days, sum of known units across days, daily average, and coverage.

=COUNTIFS(Daily!$B$6:$B$20,A19,Daily!$G$6:$G$20,"Known")
=SUMIF(Daily!$B$6:$B$20,A19,Daily!$F$6:$F$20)
=IF(E19="Complete",C19/$B$7,"Pending")
=IF(B19=$B$7,"Complete","Missing opening")

Enter the next ten formulas in Review!B6:B15. In order, they give input exceptions, days, complete warehouses, unknown warehouse-days, sum of units across days for complete warehouses, their combined average, full-pool average, Main and West’s stored-row mean, Main’s daily average, and West’s daily average. This grid and the formulas are sized for the example.

=COUNTIF(Balances!F6:F11,"Review")+IF(AND(ISNUMBER(Policy!B6),ISNUMBER(Policy!B7),Policy!B7>=Policy!B6,Policy!B7-Policy!B6=4,MIN(Daily!C6:C20)=Policy!B6,MAX(Daily!C6:C20)=Policy!B7),0,1)
=IF($B$6>0,"Review inputs",Policy!B7-Policy!B6+1)
=IF($B$6>0,"Review inputs",COUNTIF(E19:E21,"Complete"))
=IF($B$6>0,"Review inputs",COUNTIF(Daily!G6:G20,"Missing opening"))
=IF($B$6>0,"Review inputs",SUMIF(E19:E21,"Complete",C19:C21))
=IF($B$6>0,"Review inputs",IF(B8=0,"No complete series",B10/B7))
=IF($B$6>0,"Review inputs",IF(B9>0,"Pending opening balances",SUM(Daily!F6:F20)/B7))
=IF($B$6>0,"Review inputs",AVERAGEIFS(Balances!E6:E11,Balances!D6:D11,">="&Policy!B6,Balances!D6:D11,"<="&Policy!B7,Balances!C6:C11,"<>East"))
=IF($B$6>0,"Review inputs",D19)
=IF($B$6>0,"Review inputs",D20)

Main averages 8 units and West 9. Their combined daily totals add to 85 unit-days. Dividing by five gives 17 units across Main and West. Averaging their four stored rows dated within the period gives 11.25, which gives each saved row the same weight. The full three-warehouse average stays pending until East’s two opening days are known.

Try giving East a seven-unit balance effective November 1 by changing Balances!D11. All five East days now have a source and the full-pool average is 24 units. Restore November 3. Clearing Main’s zero in Balances!E7 should show Review inputs. Restore the numeric zero after testing.

Refresh the check and trace the carried balances

In Power Query, create a calendar for every in-scope item and warehouse, keep the latest pre-period change for each key, and add those pre-period dates to the calendar for their matching keys. Join the change rows to that extended calendar on item, warehouse, and date. Validate source quantities before using Fill Down. Sort by date and fill within each item and warehouse group, then filter to the report range. Keep leading nulls visible where an opening balance is missing.

For an Excel export in Jolene.pro, ask for each daily balance and the source row that supplies it. Check that West on November 2 points back to Balances!D9:E9 and that East on November 2 has no eligible source. This makes it easier to see which days used a carried balance when the report is refreshed. The spreadsheet example was checked independently. A live Jolene.pro result was not verified.

Explore other examples in Workbook Studies.

Leave a comment