PowerPivot Sort Month Names

Sort Month Names in PowerPivot

One of the new features is the sort by columns feature in PowerPivot. This allows you to sort one column (e.g. weekday names) by another column (e.g. weekday number). This can be useful, for example, to sort month names.

Related: Learn how to use PowerPivot

In PowerPivot the month name will naturally be sorted by the alphabet, so it will appear as

April
August
December
February
January
July
June
March
May
November
October
September

You will probably prefer to have it the traditional way of

January
February
March
April
May
June
July
August
September
October
November
December

On the home tab in the PowerPivot window you will notice that next to the Sort buttons there is a Sort By Columns button. Below is an example where we want to sort by the day of the week. Notice that when we sort the day of week names it starts with Friday and goes alphabetically.

powerpivot-sort-column-by-another-column

If we use the Sort by Columns button we can associate the sort order with the adjacent column with the day of week number.

powerpivot-sort-column-by-another-column

When you click on this button you need to specify which column must be used to decide the sort order.

powerpivot-sort-column-by-another-column

As a result the sort order of the column will be based on the associated column as shown below. This sort order will flow through to any pivot tables created.

powerpivot-sort-column-by-another-column

Visit the PowerPivot course pages to find out about the courses we offer