Forum Discussion
antepenultimate
3 years agoNew Member
Replacing Monthly File with next 12 months creates new header names each month
I have a forecast file that I connect to my data model and its very simple: SKU | Channel | M1 | M2 | M3 |...| M12 | But I have the actual MM/DD/YYYY as the column headers so each month, M1-M12 c...
BA_Pete
Super User
3 years agoHi antepenultimate ,
Use Unpivot Other Columns instead of Unpivot Columns:
Multi-select (Ctrl+click) [SKU] and [Location].
Go to the Transform tab > Unpivot Columns (dropdown) > Unpivot Other Columns.
Power Query will now ignore the column names of those it is unpivoting and instead only hardcode those you intially selected.
Pete
- antepenultimate2 years agoNew Member
This sounds pretty good. So the selections are the only column headers that it looks at?
- BA_Pete2 years ago
Super User
Correct. The selected columns are the only ones that get hardcoded, the rest get unpivoted as required.
Pete