Manual No More — Automating Messy Inventory Reports with PowerQuery | もう手集計はやめた。PowerQueryで在庫地獄から脱出した話
Photo by Mika Baumeister on Unsplash
Manual No More — Automating Messy Inventory Reports with PowerQuery
We used to spend 3 hours every month cleaning up messy inventory data.
CSV dumps. Manual joins. Pasted formulas. Errors galore.
And I thought:
“This isn’t work. This is punishment.”
- Inventory data was exported from a legacy system
- File names were inconsistent, column formats varied by location
- Every branch had its own tweaks and exceptions
- Our core system couldn’t generate clean summary data
And of course, HQ expected a unified monthly report.
Instead of cleaning manually every time,
I built a PowerQuery flow that did the following:
- Automatically combined CSVs from all branches
- Cleaned up nulls, renamed columns, aligned formats
- Filtered by rules (e.g., stock > 0) and summarized by product
Time spent?
⏱️ From 3 hours → 5 minutes
- Reduced human error
- Saved hours of repetitive work across 15 locations
- Inspired other teams to explore automation
Most importantly:
People stopped treating reporting as a monthly “chore,”
and started seeing it as a process we can improve.
And here’s the twist —
I had no formal training. I taught myself PowerQuery out of necessity.
Once I mastered that, PowerPivot and Power BI became the natural next steps.
These tools gave me not just speed, but scalability — and opened the door to real BI thinking.
It all started with one painful monthly report.
もう手集計はやめた。PowerQueryで在庫地獄から脱出した話
毎月、在庫データの集計に3時間かかっていました。
CSVの結合、手作業のVLOOKUP、ミスの修正……ミス……修正……エンドレス。
その時、思ったんです。
「これは仕事じゃなくて、苦行や。」
- 在庫データはレガシーシステムからCSV出力
- 拠点ごとにフォーマット・列名がバラバラ
- 空白や0やエラーが混ざり、手作業で直すのが当たり前
- 基幹システムでは、月次で使える集計データが作れなかった
それでも、本社からは毎月統一レポートが求められる。
毎回手で直すんじゃなくて、
PowerQueryでフローを組んでしまえ!と動きました。
やったことはシンプル:
- 各拠点のCSVを自動で結合
- 不要な列・空白値の除去、列名の統一
- フィルターや集計ルールの一元化
- 見やすい形式に変換して、ピボットで可視化
かかった時間?
⏱️ 3時間 → 5分 に短縮
- 手作業ミスが激減
- 全国15拠点の残業時間が削減
- 他部署でも「自動化できるかも」という空気が生まれた
そして何より大きかったのは:
「月末レポート=しんどい」が、
「仕組みで変えられるもの」へと変わったこと。
実はこれ、誰かに教わったわけじゃありません。
「必要に迫られて」独学でPowerQueryを学びました。
そして、この経験がきっかけで、PowerPivotやPower BIへと自然にスキルが広がっていったんです。
これらのツールがもたらしたのは、スピードだけでなく、拡張性でした。
そして、“データの流れを仕組み化する”BI的な発想への入り口にもなったのです。
すべての始まりは、たった1つの「つらすぎる月次レポート」でした。