Transform Your Yearly Cost View with Smarter Power Query Steps

Hello everyone!

3 min readMicrosoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

This is a question that speaks to the heart of modern data workflow challenges. When teams receive reports in formats optimized for human consumption rather than analysis, the burden falls on individuals to manually restructure data for meaningful insights. The transformation requested here—converting yearly project costs from column-based to row-based format—is more than just a technical exercise; it represents a fundamental shift from static reporting to dynamic data infrastructure. Power Query - Create Multiple Running Totals for Different Time Intervals demonstrates how these same principles of temporal data restructuring apply across different analytical contexts, while I want to use Power Query to import data received from a client, where the file name changes each month. What's the easiest way to automate this? shows how automation eliminates the friction that prevents teams from adopting more sophisticated approaches.

The solution lies in Power Query's unpivot functionality, which transforms those Year 1, Year 2, Year 3 columns into two new columns: one containing the year identifiers and another containing the corresponding cost values. This single transformation converts a format that requires mental calculation into one that can be easily aggregated, filtered, and visualized. The real value emerges when you consider how this approach scales—instead of rebuilding this transformation each month, the query becomes a reusable asset that adapts to new data automatically. For teams managing dozens or hundreds of projects, this automation compounds into significant time savings and reduces the risk of human error that creeps in during repetitive manual tasks.

What's particularly compelling about this scenario is how it illustrates the difference between data presentation and data utility. The original format might look clean and organized to a stakeholder scanning a monthly report, but it's fundamentally hostile to analysis. Each project's timeline gets scattered across columns, making it impossible to answer questions like "what are our total costs per year across all projects?" or "which projects have the highest expenses in 2026?" The transformed structure doesn't just rearrange existing information—it unlocks entirely new analytical possibilities that were previously impractical or impossible to achieve without substantial manual effort.

The broader implication here is about how we think about data workflows. Too often, organizations treat data preparation as a necessary evil rather than an opportunity to build sustainable analytical infrastructure. When teams invest in creating flexible, automated pipelines—even for seemingly simple transformations—they're not just solving today's problem, they're preventing tomorrow's technical debt. As data sources become more numerous and varied, the ability to quickly adapt and restructure information will increasingly determine which organizations can move fast and which will be burdened by legacy processes.

From Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Hello Everyone. A monthly report is generated as shown on the left. I am hoping to use Power Query to adjust the columns as shown on the right so the total cost per year is easier to visualize. Is there a simple way to use PQ for this? It isn't too hard to manually filter and do this but I'd like to remove any manual steps if possible.

Read the original at Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community