Forum Discussion
meikastler
3 years agoFrequent Visitor
Unstacking Forecast and Actual Data from a Single Column
I am brand new to Power Query and have been stuck on this problem for the past 5 days. I've tried watching tons of YouTube videos (especially by Goodly), but the solutions provided don't help my spec...
- 3 years ago
No worries 🙂
OK, so if the values in column2 are unique for each value in column1, then a pivot-operation would do the job:
1) Check Column1
2) go to Transform tab and choose "pivot column"
3) Select Column3 for the "Values Column"
ImkeF
3 years agoCommunity Champion
Good to see 🙂
The values in column1 are text values, so you need an additional helper column for the sorting.
Unfortunately - at least to my knowledge - there isn't a native function that derives the month number from a text string. So the formula is a bit more complicated.
Add a new column with the following formula
Date.Month(Date.FromText("2000-" & [Column1] & "-01"))
You can sort by it in the query editor.
But more importantly: You can use this column as the sort-by-column for your Column1 later in the data model.
- meikastler3 years agoFrequent Visitor
This was GOLD! Thank you so, so much! 😍