dealing with 4-5-4 calendar functions and trying to get an "avg inventory" calc

Guitarmageddon

Board Regular
Joined
Dec 22, 2014
Messages
161
Hello folks,
I deal in retail 4-5-4 for the date perspective of my data. There are many nifty time intelligence functions in DAX, but they work off a standard calendar. This is where my brain starts to hurt a bit....

In retail, the average inventory for a given month would be its End Of Period measured inventory, plus its beginning of period inventory, divided by 2. The data I have in my query are monthly files that snapshot the EoP inventory by different lines of business, in units (this is what you see in "QTY AVAIL" below). I'm after an average unit inventory number. I then take that warehouse inventory, look at units shipped out for that same month, and essentially arrive at a "days of supply number" (DOS below, by warehouse)

Like so:
1699369285742.png

DOS derived via this formula:
1699369356379.png


Im struggling with how to correct the DOS formula above to be more accurate. Currently its just using that current month EOP unit number (i.e. SUM ACTUAL QTY) but it needs to be using that month, plus the month one before, then dividing by 2. Without having the ability to use paralell period since i am using 4-5-4, how do I do this?

Here is a snip of what my calendar table looks like. Does anyone have thoughts how I can do the "month + month-1 " type perspective here?
1699369607026.png
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
One attempt I just made.... in trying to piece together the beginnings of this average inventory formula and seeking out the way to sum one month, plus the month directly prior, I tried this:

You can see I used "previous month" and by tracing a couple of the red lines / blue lines, you can see for that particular month/whse num, it worked. Then it breaks.... perhaps because month isnt typical in a 4-5-4? So for october 60001, it correctly shows 311,658, which is the september 60001 qty avail measurement. And just to reitarate, 4-5-4 months do not correlate to regular calendar months, since they keep weeks whole, as you can see above 2/26/2023 for example being considered a march date.
1699370507145.png
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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