• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Days on hand|Power Pivot|Excel Forum|My Online Training Hub

You are here: Home / Days on hand|Power Pivot|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower PivotDays on hand
sp_PrintTopic sp_TopicIcon
Days on hand
Avatar
Johan Vandeweijer
Member
Members
Level 0
Forum Posts: 15
Member Since:
March 3, 2021
sp_UserOfflineSmall Offline
1
September 24, 2021 - 6:55 pm
sp_Permalink sp_Print

Dear, 

I wanted to create days on hand (DOH), but when there is no demand, I get an error.

For example.

Stock today 500

Week 39 no demand.

Week 40 October 5th 400 pcs

For me Days on hand are ((Stock+Receipts)/Demand * working days) - working days.

I should expect that week 38 (this week) I should see DOH = 8 days.

Week 39 = 7 days.

But for those week, I get "# NUM!". 

The formula I used are:

StockReceipts/Requirements:=([Total Stock]+[Total Receipts])/[Total Requirements]

DOH:=CALCULATE([StockReceipts/Requirements];FILTER(ALLSELECTED('Date'[Date]);ISONORAFTER('Date'[Date];MAX('Date'[Date]);DESC)))

Can somebody help me with the right formula , so that the "# NUM!" are replaced the the right value?

I added some example. I created the formula in power pivot.

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4515
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
September 25, 2021 - 9:45 am
sp_Permalink sp_Print

Hi Johan,

Please upload the file again. Be sure to click the 'Start Now' button and wait for the grey check mark beside the file size to indicate it's finished uploading before submitting your reply.

Mynda

Avatar
Johan Vandeweijer
Member
Members
Level 0
Forum Posts: 15
Member Since:
March 3, 2021
sp_UserOfflineSmall Offline
3
September 27, 2021 - 3:23 pm
sp_Permalink sp_Print

Hey Mynda, 

Thanks for the remark. File added.

Johan

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4515
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
September 28, 2021 - 8:15 pm
sp_Permalink sp_Print

Hi Johan,

Please explain how you get the working days value? It is nowhere in your model. Please also show an example where you calculated DOH for week 39 using the values in your model, so we can trace it back and understand where all the figures come from.

Mynda

Avatar
Johan Vandeweijer
Member
Members
Level 0
Forum Posts: 15
Member Since:
March 3, 2021
sp_UserOfflineSmall Offline
5
September 28, 2021 - 9:50 pm
sp_Permalink sp_Print

Hey Mynda, 

 

I added a print screen of what I wanted to calculate. In SAP, you can see how many days you have stock.

Regarding to me this is calculate (DOH = ((Stock+ Receipts)/Recequirements) * working days - working days.

This I wanted to do in excel, via Power pivot. In my excel file, you can go to power pivot.

But I don't know how to do this, taking into account that I have stock, but no demand current week. And do I have to add in the calendar the working days? For example when it's Saterday or Sunday = 0 and other days are 1?

And is it then possible to create a formula like below? And what in case I don't have demand, but only week after as I mentioned? 

It should DOH1.pngImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage DOH1.png (131 KB)
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4515
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
6
September 29, 2021 - 2:45 pm
sp_Permalink sp_Print

"And do I have to add in the calendar the working days?", yes, that is the missing piece of the puzzle. It's not clear what this represents e.g. working days until the end of the month, week, year? 

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 216
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Melanie Ford
Isaac Felbah
Adele Glover
Hitesh Asrani
Rohan Abraham
Anthony van Riessen
Erlinda Eloriaga
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Forum Stats:
Groups: 3
Forums: 24
Topics: 6356
Posts: 27793

 

Member Stats:
Guest Posters: 49
Members: 32324
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.