Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Each Year will get a new File with the New Year-Month as a header Row.
How to Unpivot the data.
Sample Data :
| Key | Jan-23 | Feb-23 | Mar-23 | Apr-23 |
| AA1 | 454 | 46 | 67 | 778 |
| AA2 | 54 | 123 | 7545 | 57 |
| AA3 | 6564 | 56 | 656 | 656 |
| AA4 | 34 | 245 | 657 | 55 |
| AA5 | 2342 | 34 | 23 | 54 |
| AA6 | 56 | 12 | 354 | 454 |
| AA7 | 787 | 5464 | 123 | 123 |
| AA8 | 234 | 57 | 56 | 679 |
| Key | Jan-24 | Feb-24 | Mar-24 | Apr-24 |
| AA1 | 54 | 43 | 545 | 778 |
| AA2 | 545 | 6 | 3423 | 3 |
| AA3 | 65 | 56 | 656 | 656 |
| AA4 | 34 | 7 | 23 | 7776 |
| AA5 | 2342 | 56 | 34 | 54 |
| AA6 | 6 | 7 | 354 | 454 |
| AA7 | 787 | 4545 | 434 | 43 |
| AA8 | 234 | 57 | 56 | 34 |
=Table.UnpiovtOtherColumns(PreviousStepName,{"Key"},"MonthYear","Value")
Thanks @wdx223_Daniel / for the Response.
The Above I have already tried but, But I feel this doesn't work when another file comes in into same dataset. for another Year.
If you see below i have exported 2 year of Data, but even if i will make first row as header , In the Header Row will have year 2023, But same will get unpivoted. Even Year 2024 Data will get unpivoted with 2023 only.
That's where i am facing the issue. in the same dataset every year , i have add the files, But Header Row has to be changed every year.
=Table.Combine(Table.Group(PreviousStepName,"Column1",{"n",each Table.RenameColumns(Table.UnpivotOtherColumns(Table.PromoteHeaders(_),List.FirstN(Record.ToList(_{0}),2),"Date","Value"),{Record.ToList(_{0}){0},Table.ColumnNames(_){0}})})[n])
It looks like you are combining files from multiple years. You will want to apply the unpivot recommended by @wdx223_Daniel to your sample transformation query. You can then hop back into your main query after the files are combined and repivot or transform however you need.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 4 |