
In many real-world scenarios, simply adding lead time to a date does not produce accurate results.
Weekends and holidays must be excluded to calculate realistic delivery schedules.
Handling this logic with Excel formulas can quickly become complex and difficult to maintain.
In this example, you will learn how to use Power Query to calculate delivery start dates based on working days.
The result updates automatically whenever the source data is refreshed.
Power Query를 활용해 입고일과 Lead Time을 기준으로 배달 시작일을 자동 계산하는 방법을 정리했습니다.
엑셀에서 날짜에 Lead Time을 단순히 더하는 방식으로는 실제 업무에 맞는 결과를 얻기 어려운 경우가 많습니다. 특히 토요일, 일요일과 같은 주말이나 공휴일을 제외해야 하는 경우에는 일반 수식으로 처리하기가 복잡해집니다.
이럴 때 Power Query를 활용하면 보다 안정적으로 작업일 기준 날짜 계산을 자동화할 수 있습니다.
먼저 공휴일 목록이 포함된 데이터를 불러와 날짜 형식으로 정리합니다. 이 공휴일 데이터는 이후 작업일 계산 시 제외 기준으로 사용됩니다.
다음으로 입고일과 Lead Time 데이터를 정리한 후, List.Dates 함수를 이용해 입고일 기준의 날짜 리스트를 생성합니다. 이후 List.Select을 사용하여 주말과 공휴일을 제외한 날짜만 필터링합니다.
그 다음 Lead Time에 해당하는 순서의 날짜를 선택하여 배달 시작일을 계산하고, 필요에 따라 요일 정보까지 추가하면 실무에서 바로 사용할 수 있는 형태로 정리할 수 있습니다.
이 구조를 만들어두면 입고일이나 Lead Time이 변경되더라도 새로고침만으로 자동으로 결과가 업데이트되기 때문에 반복 작업 없이 효율적으로 관리할 수 있습니다.
Power Query, M code, 엑셀 자동화 관련 실전 예제를 계속 공유할 예정입니다.
videolink - https://youtu.be/aC_mg9y1tU8
Download the sample file below.
You can download the zip file in [자료실][Download] page
The file name is 25.자동문자분류(category value)
Use the English M code provided for your dataset.
✔ Download the ready-to-use Power Query template below
✔ Just copy and paste the M code – works instantly
The original sample file is based on a Korean dataset.
You can apply the English M code to adapt it to your own data.
--------------------------------
Need a custom automation for your Excel workflow?
I can build a tailored solution based on your data.
✔ Used in real-world business automation
✔ Saves hours of manual work
minbedata@gmail.com
You can pay via PayPal.
You can also contact me via Upwork for secure payment and project handling.
<a href="https://www.upwork.com/freelancers/~01eb52dbd212cffc17" target="_blank">
Hire me on Upwork
</a>
You don't worry about conversing with me.
My Major is an English literature, so I can speak English fluently and read, listening, writing proficiently
korean version web address (한국버전) is
<a href="https://blog.naver.com/minbe-data" target="_blank">네이버 블로그 바로가기</a>