Forum Discussion
Adding month names and sorting accordingly
- Anonymous5 years ago
In your Date table using Power Query, use:
Table.AddColumn(#"Replace_with_previous_step_name", "Month Name", each Date.MonthName([Date]), type text)
This way, you have a column of Month names in your Date table. Make sure you also have that column of Month Numbers in the same date table. Then, once you have loaded everything and are in the main interface, go over to the Table view and open your date table. Select the Month Name column, click Sort By, and select the month number column. Once this is done, your model will show the correct order of months.
In your Date table using Power Query, use:
Table.AddColumn(#"Replace_with_previous_step_name", "Month Name", each Date.MonthName([Date]), type text)
This way, you have a column of Month names in your Date table. Make sure you also have that column of Month Numbers in the same date table. Then, once you have loaded everything and are in the main interface, go over to the Table view and open your date table. Select the Month Name column, click Sort By, and select the month number column. Once this is done, your model will show the correct order of months.
- Anonymous5 years agoNot applicable
I didn't know where to enter that in Power Query, but you pointed me in the right direction. I added a conditional column in Power Query, and then sorted the column by the month numbers. Thank you.