How to Order Month Name in Power BI
Nothing disrupts a beautiful dashboard quite like a chart that lists months in alphabetical order: April, August, December, February. Power BI does this by default, and it’s one of the first and most common beginner formatting hurdles. Fortunately, the fix is straightforward and teaches a fundamental concept about how Power BI handles sorting.
This tutorial will walk you through the definitive way to order month names chronologically in your Power BI reports. We'll cover the simple DAX formulas you need, the specific button to click, and how to handle more complex scenarios like financial years.
Why Power BI Sorts Months Alphabetically (And How We'll Fix It)
By default, Power BI treats text fields, like "January," "February," or "March," as simple strings of characters. When you place a text field into a visual, its default sort behavior is alphabetical. It doesn’t inherently know that "January" is the first month of the year, it just knows that "A" (April, August) comes before "D" (December).
To fix this, we need to provide Power BI with a hidden instruction. We’ll tell it, "When you see the column with month names, don't sort it alphabetically. Instead, sort it based on this other column I'm pointing you to." That other column will be numerical - a simple month number from 1 to 12. This method is the foundation for custom sorting on any text-based field, from project stages to days of the week.
The Step-by-Step Guide to Chronological Month Sorting
The solution involves two main stages: first, ensuring you have the necessary "helper" columns in your data model, and second, applying the "Sort by Column" feature.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Part 1: Preparing Your Data with a Date Table
Best practice in Power BI dictates using a dedicated 'Date Table' or 'Calendar Table.' This is a separate table that contains a continuous list of dates and associated time-related information (Year, Quarter, Month Name, Month Number, etc.). It simplifies all time intelligence calculations.
Let's assume you have a Date Table. If not, you can create one easily using DAX or Power Query. The critical part is that this table must contain a column for the Month Name and a corresponding column for the Month Number.
Step 1: Create the 'Month Name' Column
If your Date Table doesn't already have a month name column, you can create one using a calculated column. Go to the Data View in Power BI, select your Date Table, and click 'New Column' from the ribbon.
Enter the following DAX formula:
Month Name = FORMAT('Date'[Date], "MMMM")Let’s break this down:
- Month Name = This is the name of your new column.
- FORMAT: This is a powerful DAX function that converts a value (like a date) into text with a specific formatting style.
- 'Date'[Date]: This refers to the primary date column in your Date Table. Replace it with your actual table and column name if different.
- "MMMM": This format code tells DAX to return the full name of the month (e.g., "January"). If you wanted the short name ("Jan"), you would use "MMM" instead.
Step 2: Create the 'Month Number' Sort Column
Next, we need the numerical column that we'll use for sorting. This will be our "helper" or "sort key" column. Following the same process, create another new calculated column.
Enter this DAX formula:
Month Number = MONTH('Date'[Date])Here's what this does:
- Month Number = This is the name of our new sorting column.
- MONTH: This simple DAX function returns the month number (from 1 to 12) from a given date.
- 'Date'[Date]: Again, this points to your date column.
After creating these two columns, your Date table will have a 'Month Name' (e.g., "January") and a corresponding 'Month Number' (e.g., 1) for every row.
Part 2: Applying the 'Sort by Column' Feature
Now that our data is prepared, we can give Power BI the final instruction. This is done in the Data View.
Step 3: Select the Column You Want to Sort
In the Data View, with your Date Table visible, click on the header of the Month Name column. It's important to select the column itself, not just a cell within it. You'll know it's selected when the whole column is highlighted in grey.
Step 4: Use the 'Sort by Column' Tool
After selecting the 'Month Name' column, a "Column tools" tab will appear in the top ribbon. Within this tab, you'll see a button labeled Sort by Column.
Click this button. A dropdown menu will appear, listing every other column in your Date Table.
Step 5: Pick Your Sorting Column
From the dropdown menu, select the Month Number column that we created in step 2.
That's it! Nothing will visibly change in the Data View, but you've just established a permanent sorting rule in your data model. You’ve told Power BI: "From now on, whenever you need to sort the 'Month Name' column, use the numerical order of the 'Month Number' column."
Step 6: Verify Your Visual
Go back to the Report View. Any charts, tables, or slicers using the 'Month Name' field should now be automatically re-sorted into the correct chronological order: January, February, March, and so on. If it doesn't update immediately, you may need to click the three dots (...) on your visual, go to 'Sort axis,' and re-select your Month Name field to trigger the new rule.
Handling Common Scenarios and Variations
The method above is the standard approach, but business reporting often has unique requirements. Here’s how to adapt the technique for other situations.
Sorting Months for a Financial Year
What if your company’s fiscal year starts in July instead of January? A standard 1-12 month number won't work, because January (1) would appear before July (7). We need a custom sort key that puts July at the beginning.
To do this, create a new calculated column for a "Fiscal Month Number." Let's assume a fiscal year that starts in July.
Use the following DAX formula:
Fiscal Month Number = IF(MONTH('Date'[Date]) >= 7, MONTH('Date'[Date]) - 6, MONTH('Date'[Date]) + 6)How this formula works:
- It checks if the month number is greater than or equal to 7 (July or later).
- If true (for July-December), it subtracts 6. This turns July (7) into 1, August (8) into 2, and so on, placing them at the start of our fiscal year.
- If false (for January-June), it adds 6. This turns January (1) into 7, February (2) into 8, etc., pushing them to the back half of our fiscal year.
Once you have this 'Fiscal Month Number' column, simply follow Steps 3-5 again, but this time, sort your 'Month Name' column by the new 'Fiscal Month Number' column.
Sorting a "Month Year" Text Field (e.g., "January 2023")
If your visuals span multiple years, just sorting by month name ("January") won't be enough. "January 2024" needs to come after "December 2023." For this, you need a 'Month Year' column and a corresponding numeric sort column.
- Create the Display Column:
Month Year = FORMAT('Date'[Date], "MMMM YYYY")This will generate text values like "January 2023," "February 2023," etc.
- Create the Sort Key Column:
Year Month Sort = FORMAT('Date'[Date], "YYYYMM")This clever trick creates a concatenated numeric-text value like "202301," "202302." When Power BI sorts this as a number, it will naturally place them in perfect chronological order. Be sure to select this Year Month Sort column in Data View and change its Data Type to "Whole Number" in the Column tools ribbon.
- Apply the Sort:
Sort your new 'Month Year' column by the 'Year Month Sort' column.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Troubleshooting: Why It Might Not Be Working
If you followed the steps and your visual is still not sorting correctly, here are two common mistakes to check.
Possibility 1: Sorting in the Visual Instead of the Data Model
A frequent error is trying to fix the sort order within the visual itself. While you can click the ellipsis (...) on a chart and manually set the sort order, this is a temporary and inflexible fix. The 'Sort by Column' feature in the Data View is the correct way, as it sets a permanent, model-wide rule for how that column behaves everywhere.
Possibility 2: Relationship Errors in Your Sort Columns
The "Sort by Column" feature works on a one-to-one principle. For every unique value in the 'Month Name' column, there must be a corresponding single, unique value in the 'Month Number' column. In our example, "January" always maps to "1", "February" always maps to "2", etc. If your data somehow had "January" mapping to both "1" and "13" in different rows, Power BI would throw an error because it has a conflicting instruction.
This is another reason why a well-structured Date Table is crucial. It ensures these relationships are clean and consistent by design.
Final Thoughts
Mastering the "Sort by Column" feature is a fundamental step in moving from a beginner to an intermediate Power BI user. By creating a numeric helper column, you can impose any custom sort order you need on text fields, ensuring your reports are logical, intuitive, and display time-series data correctly.
We know that managing these data quirks can be tedious work. This manual setup - creating calculated columns, defining sort orders, and validating relationships - is exactly the kind of friction we built Graphed to eliminate. Our entire platform is designed around the idea that you should be able to get answers from your data without wrestling with technical details. When you ask to see your sales by month, we handle the chronological sorting automatically, so you get a perfectly ordered chart every time, instantly.
Related Articles
YouTube Ads for Small Businesses: The Complete Guide for 2026
Learn how small businesses can leverage YouTube ads to reach their ideal customers, build brand awareness, and drive conversions in 2026. This comprehensive guide covers setup, targeting, budgeting, and optimization strategies.
YouTube Ads for Motivated Sellers: The Complete 2026 Guide
Learn how to use YouTube ads to target motivated sellers in 2026. Discover proven strategies, setup tips, and best practices for real estate wholesaling success.
YouTube Ads for Ecommerce: The Complete Guide to Shoppable Videos in 2026
Discover how YouTube shoppable video ads can transform your ecommerce strategy. Learn how to set up product feeds, leverage CTV advertising, and achieve 60%+ more conversions with this comprehensive guide for 2026.