Power Query Start Year to Year convert
Our take
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.
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.
| Data | Desired Output | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Project Name | Project Start Year | Year 1 | Year 2 | Year 3 | Year 4 | Project Name | Project Start Year | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | |
| Alpha | 2024 | 1,000.00 | 600.00 | 200.00 | 0.00 | Alpha | 2024 | 1,000.00 | 600.00 | 200.00 | 0.00 | 0.00 | 0.00 | |
| Bravo | 2025 | 200.00 | 0.00 | 0.00 | 0.00 | Bravo | 2025 | 0.00 | 200.00 | 0.00 | 0.00 | 0.00 | 0.00 | |
| Charlie | 2024 | 500.00 | 500.00 | 500.00 | 100.00 | Charlie | 2024 | 500.00 | 500.00 | 500.00 | 100.00 | 0.00 | 0.00 | |
| Delta | 2026 | 200.00 | 100.00 | 0.00 | 0.00 | Delta | 2026 | 0.00 | 0.00 | 200.00 | 100.00 | 0.00 | 0.00 | |
| Echo | 2026 | 1,500.00 | 1,000.00 | 500.00 | 250.00 | Echo | 2026 | 0.00 | 0.00 | 1,500.00 | 1,000.00 | 500.00 | 250.00 | |
| Foxtrot | 2025 | 1,000.00 | 1,000.00 | 1,000.00 | 1,000.00 | Foxtrot | 2025 | 0.00 | 1,000.00 | 1,000.00 | 1,000.00 | 1,000.00 | 0.00 |
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- Power Query - Create Multiple Running Totals for Different Time IntervalsHi, This is the sample layout of my dataset: Week Month Res Project Area Val1 Val2 Val3 4-Apr-25 Apr-25 IT Proj 01 North 50 100 150 11-Apr-25 Apr-25 IT Proj 01 North 100 150 200 18-Apr-25 Apr-25 IT Proj 01 North 150 200 250 2-May-25 May-25 IT Proj 01 North 200 250 300 4-Apr-25 Apr-25 IT Proj 02 South 10 20 30 11-Apr-25 Apr-25 IT Proj 02 South 20 30 40 18-Apr-25 Apr-25 IT Proj 02 South 30 40 50 2-May-25 May-25 IT Proj 02 South 40 50 60 Im trying to generate this table in Power Query which will add 4 new grouped running total columns for each value columns: Running Total till date Running Total Monthly Running Total Inmonth Only Monthly Total Static Value This is the sample output for Val1 column. Will need it repeated for Val2 and Val3 columns also: Week Month Res Project Area Val1 - RT Overall Val1 - RT Monthly Val1 - RT InMonth Val1 - RT ThisMonth 4-Apr-25 Apr-25 IT Proj 01 North 50 300 50 300 11-Apr-25 Apr-25 IT Proj 01 North 150 300 150 300 18-Apr-25 Apr-25 IT Proj 01 North 300 300 300 300 2-May-25 May-25 IT Proj 01 North 500 500 200 200 4-Apr-25 Apr-25 IT Proj 02 South 10 60 10 60 11-Apr-25 Apr-25 IT Proj 02 South 30 60 30 60 18-Apr-25 Apr-25 IT Proj 02 South 60 60 60 60 2-May-25 May-25 IT Proj 02 South 100 100 40 40 submitted by /u/land_cruizer [link] [comments]
- A way to join tables or keep separate?Hello, folks. I run a services company. Often my clients ask for a budget summary broken down by fiscal year (including PROJECTED billings). Last year I got smart and added a formula to calculate the fiscal year (e.g. 2025-25 for those starting in January, and 2025-26 for those with a July FY start date) for each billing milestone ([Milestones table]. That enabled me to produce the customer summary table (really a GROUPBY array) in the screenshot. COMPLICATION I decided to streamline [Milestones] by moving the invoice detail to another table. Now I have a situation where the PROJECTED billings and their [expected invoice date] are in one table, and the INVOICED billings are in another table with [paid date]. These tables are in the data model (see attached) so i tried to get a pivot table using the linked tables to work, but it is not working as expected. (See data model screenshot.) QUESTION Is there a way to output both invoiced and projected billings in one table, grouped by the (customer-specific) FY? In my mind I can create a joined table in the data model, but I am no db expert and I am still struggling with powerquery. https://preview.redd.it/okhw5q66cxmg1.jpg?width=812&format=pjpg&auto=webp&s=26e38742adb0dce2c2069b77ee87a8de0a006f77 https://preview.redd.it/wad9g539bxmg1.jpg?width=402&format=pjpg&auto=webp&s=84cdf0a963bcb93ba5fa0016c5e9d98a9b175a48 submitted by /u/MelKCh [link] [comments]
- 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?I used to use VBA for this, but that's a lot more roundabout, and I have a lot less control over the transformation. I have no issues with transforming the actual data itself. My issue lies in the fact that it's a different file each month. Using wildcard formatting, *filehere*.xls* would always pull the correct file. This file is also stored in the same place relative to my spreadsheet each time, but the location of the spreadsheet and folders itself changes each month. In VBA, I could find the relative position quite easily via ThisWorkbook.Path & "\Data\" However, I don't know how to use PQ to import automatically like this, so that I'd always import the correct data simply by refreshing links. I think I've seen people set up a somewhat hacky way, where PQ first reads a table in the workbook to retrieve values, and then uses those to find the file to query. Is that the only way? submitted by /u/space_reserved [link] [comments]
- Power query for a large datasetMy company uses a horrible format for its daily production sheets, but the data can be pulled through power query. I want to build a reporting tool for looking at any major trends that are currently missed. Ideally looking at part efficiency by machine type and some other descriptive data too like efficiency by shift manger etc. My problem is that even after cutting unnecessary columns and filtering unnecessary rows, it takes forever to load anything. ChatGPT isn’t all that helpful, I’d like some expert advice please! For info, rough number of rows of data is about 50,000 per year. I want to cover at least the last three years. Sheets are all saved into a folder by month, within a folder by year. submitted by /u/CanJesusSwimOnLand [link] [comments]