How to Sort by Fiscal Month in Power BI

Cody Schneider••7 min read

Nothing sinks that "I'm almost done" feeling faster than a Power BI chart that sorts your fiscal months alphabetically. You’ve done all the hard data modeling work, written your measures, and created the perfect visual, but the x-axis reads April, August, December… not the chronological order you need. This common formatting snag is incredibly frustrating, but it has a straightforward fix. This tutorial will walk you through exactly how to create a custom sort order for your fiscal calendar, ensuring your reports are always clear, correct, and professional.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Does Power BI Sort Months Alphabetically?

Before diving into the solution, it helps to understand why this happens. When you create a column for fiscal month names (like "July", "August", etc.), Power BI sees those values as simple text strings. By default, it has no way of knowing that "July" (the first month of your fiscal year) should come before "January" (the seventh month). Its only option is to apply the default text sorting behavior, which is alphabetical order. Your beautiful bar chart tracking performance across a fiscal year suddenly becomes a confusing, out-of-order mess.

To fix this, we need to give Power BI explicit instructions. We will create a supplementary column that contains the numeric order of your fiscal months (1 for the first month, 2 for the second, and so on) and then tell Power BI to use that column to sort your fiscal month names column. It’s a simple concept, but it requires a few steps in your data model.

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.

The Step-by-Step Guide to Sorting Fiscal Months

The best practice for any time-based analysis in Power BI is to use a dedicated Calendar Table. This table acts as a central source for all your date-related fields - year, quarter, month, week, day of the week, etc. If you don't have one already, creating a basic calendar table is the first step. For this guide, we'll assume you have a calendar table (often a calculated table using CALENDARAUTO() or CALENDAR()) with a standard 'Date' column.

Our goal is to add three new calculated columns to this Calendar Table:

  • Fiscal Year: Determines the correct fiscal year for each date.
  • Fiscal Month Name: The text name of the month ("January", "February", etc.).
  • Fiscal Month Sort: A numeric column (1-12) representing the true chronological order. This is the magic key to our solution.

Step 1: Create Your Fiscal Year Column

First, we need to correctly identify the fiscal year for every date in our calendar. Let's assume your fiscal year starts in July. This means any date in July 2023 or later (up to June 2024) belongs to Fiscal Year 2024.

In the Data view of Power BI, select your Calendar table and click "New column." Enter the following DAX formula. This formula checks if the month of the date is 7 or greater (July). If it is, the fiscal year is the calendar year + 1. Otherwise, it's just the calendar year.

Fiscal Year = 
IF(
    MONTH('Calendar'[Date]) >= 7,
    YEAR('Calendar'[Date]) + 1,
    YEAR('Calendar'[Date])
)

Adjust the >= 7 part to match your fiscal year's starting month (e.g., >= 4 for a fiscal year starting in April).

Step 2: Add a Fiscal Month Name Column

This part is simple. We just need a column containing the name of the month for each date. This is the column we'll eventually use in our chart's axis.

Create another new column in your Calendar table with this straightforward DAX formula:

Month Name = FORMAT('Calendar'[Date], "MMMM")

This will give you the full month name ("January", "February", etc.) that you want to display in your charts.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 3: Create the All-Important Fiscal Month Sort Column

This is where we solve the sorting problem. We need to create a numeric column that assigns numbers 1 through 12 based on your fiscal calendar, not the standard calendar. Continuing with our July start date, July should be 1, August should be 2, ..., and June should be 12.

Create a new column named "Fiscal Month Sort" and use the SWITCH function to assign the correct order. The SWITCH function is cleaner than a series of nested IF statements.

Fiscal Month Sort = 
SWITCH(
    TRUE(),
    'Calendar'[Month Name] = "July", 1,
    'Calendar'[Month Name] = "August", 2,
    'Calendar'[Month Name] = "September", 3,
    'Calendar'[Month Name] = "October", 4,
    'Calendar'[Month Name] = "November", 5,
    'Calendar'[Month Name] = "December", 6,
    'Calendar'[Month Name] = "January", 7,
    'Calendar'[Month Name] = "February", 8,
    'Calendar'[Month Name] = "March", 9,
    'Calendar'[Month Name] = "April", 10,
    'Calendar'[Month Name] = "May", 11,
    'Calendar'[Month Name] = "June", 12
)

Carefully update this formula to reflect your company's fiscal calendar sequence. After you create this column, your Calendar table will have all the necessary components.

Step 4: Apply the "Sort by Column" Feature

Now that we have our sorting logic built, we need to tell Power BI to use it.

  1. Stay in the Data view.
  2. Select your Calendar table.
  3. Click on the header of the Month Name column to select it. (Do not select the sort column.)
  4. The Column tools ribbon will appear at the top. Click on the Sort by column button.
  5. A dropdown list of all the other columns in your table will appear. Select our new Fiscal Month Sort column.

That’s it! Power BI may take a moment to process the change. Now, when you return to the Report view, any visual that uses the "Month Name" column will automatically be sorted chronologically based on your fiscal calendar.

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.

Making Your Sorting Formula More Dynamic

Hardcoding the fiscal sort order with a SWITCH statement works perfectly fine, but what if your fiscal start month changes? Or if you want to reuse this logic across different reports with different fiscal calendars? You can create a more dynamic and robust sorting column using a bit of DAX modeling.

First, create a column in your Calendar table simply for the calendar month number:

Month Number = MONTH('Calendar'[Date])

Next, let's create a dynamic version of the "Fiscal Month Sort" column with a formula that doesn't depend on month names. The trick is to use some simple modular arithmetic.

-- Let's say our fiscal year starts in month 7 (July)
VAR fystart_month = 7
RETURN
    IF(
        'Calendar'[Month Number] < fystart_month,
        12 + 'Calendar'[Month Number] - fystart_month + 1,
        'Calendar'[Month Number] - fystart_month + 1
    )

This looks more complicated, but it's incredibly flexible. By just changing the fystart_month variable at the top, you can adjust the entire sort order for any fiscal calendar without rewriting a long SWITCH statement.

Practical Tips & Final Checks

  • Hide the Sort Column: To keep your Fields pane clean for report builders, right-click on your Fiscal Month Sort column and choose "Hide in report view." The sorting will still work, but the column won't clutter the view for end-users.
  • Verify Relationships: Ensure your Calendar table has an active, one-to-many relationship with the date column(s) in your fact tables (e.g., your sales table, marketing data, etc.). Your custom sort order won't work correctly without proper data model relationships.
  • Concatenated Month & Year: For some visuals, you may want to show the month and year together (e.g., "Jul 2023"). Create a column like:
Fiscal Month & Year = FORMAT('Calendar'[Date], "MMM") & " " & 'Calendar'[Fiscal Year]

and apply a similar numeric sorting column for a proper chronological display across multiple years.

Final Thoughts

Manually programming custom calendars in Power BI highlights how simple reporting requests can get bogged down in technical details like DAX formulas and data modeling. By creating a text column for your fiscal month names and a dedicated numeric column for their sort order, you're giving Power BI the roadmap it needs to display your data correctly and intuitively every time.

If you find yourself constantly wrestling with this type of data cleanup instead of uncovering insights, that’s precisely the friction we created Graphed to eliminate. We connect directly to your marketing and sales platforms, handling all the complex data modeling and cleanup behind the scenes. Instead of writing DAX, you can simply ask for the chart you want in plain English - like “Show me last quarter’s revenue by fiscal month” - and Graphed instantly builds a perfectly sorted, real-time-updated dashboard for you.

Related Articles