How to Sort Month Names Chronologically on a Power BI Line Chart Axis

Abstract: Power BI sorts text columns alphabetically, so month names land on the X axis as Apr, Aug, Dec. Add a numeric month key and set Sort by Column to restore Jan-to-Dec order.

Created: 2026-11-02 by

Power BI treats a Month column like any other piece of text and sorts it alphabetically, which is why your axis reads Apr, Aug, Dec instead of Jan, Feb, Mar. The fix is to give every month name a number behind the scenes and tell Power BI to sort the name by that number. One small model change repairs the axis on every chart, slicer, and matrix that uses the column.

Why the months land in the wrong order

In a SharePoint list, Month is typically a calculated field that pulls a name such as "Jan" or "Feb" out of the Date column. When that value arrives in Power BI, it is plain text. Power BI has no built-in knowledge that "Feb" follows "Jan"; it applies its default sort order for text, which is alphabetical. Excel gets away with the same chart because it recognizes the values as parts of dates and applies calendar logic automatically — Power BI makes no such assumption.

The same problem affects weekday names (Mon, Tue, Wed...), clothing sizes, and any other text column whose natural order is not A-to-Z.

Step 1: Add a month number column

Open the model in Power BI Desktop (model edits are easiest there), switch to Table view, select the table that holds Date, and choose New column under Table tools. Enter:

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

Replace Incidents with your table name. The DAX MONTH function returns 1 for January through 12 for December. If you prefer to fix the data upstream, add the equivalent column in Power Query instead: Add Column → Date → Month → Month of Year, which generates Date.Month([Date]). Either way, confirm the new column shows Jan = 1 through Dec = 12.

Step 2: Sort the month name by the number

This is the step people miss. Still in Table view, click the Month column itself — the text column used on the chart axis, not the new number. Then select Sort by column and pick Month Number. Power BI stores this as a model-level rule: from now on, whenever the Month column appears anywhere — a line chart axis, a slicer, a matrix header — it is ordered Jan through Dec.

One rule makes this work: the mapping must be one-to-one. Every month name must correspond to exactly one number. Before applying the sort key, clean up the Month values:

  • Standardize casing — "Jan" and "jan" are two different values as far as Power BI is concerned.
  • Remove blanks and stray text that slipped in from the source list.
  • Keep exactly one number per name; duplicates break the sort relationship.

Alternative: Sort the visual when you can't edit the model

If you are working directly in the Power BI Service and lack permission to change the data model, you can still fix a single chart. Drag Month Number into the Tooltips bucket of the visual, then open the chart's ... menu, choose Sort by, and select the month number field with Sort ascending. The sort menu only offers fields that are part of the visual, which is why the number has to ride along in Tooltips. This works, but it is a per-visual workaround: you must repeat it on every chart, and the raw number will appear in the tooltip. The Sort by column method from Step 2 is the cleaner, permanent fix.

A sturdier setup for years of seasonal data

With sixteen years of incidents, a dedicated month or date table pays off quickly. Build a small dimension containing Month Name, Month Number, and a Year-Month key such as FORMAT('Incidents'[Date], "YYYY-MM"), apply the same Sort by column rule to the name column, and relate the table to your incidents. You then get consistent ordering everywhere, plus two different views of the data: month-only seasonality (12 points, comparing the same month across years) and true chronological history (one point per year-month). A line chart with 192 points tells a very different story from one with 12, so keep both options available.

Frequently Asked Questions

Why does Excel sort months correctly but Power BI doesn't?

Excel recognizes date-like values and applies calendar order automatically. Power BI sees your Month column as ordinary text and falls back to alphabetical sorting until you supply a numeric sort key.

Can I fix the order without adding a column?

Not cleanly. Power BI has no built-in "month" sort for a text column. The nearest workaround is the tooltip-and-sort trick described above, which works per visual but does not fix slicers or other charts.

Why is Sort by column greyed out or ignored?

The sort key must map each month name to exactly one number. Duplicate month names, mixed casing, or blanks violate the one-to-one requirement. Standardize and deduplicate the Month values, then apply the rule again.

My data spans many years — how do I get true chronological order?

Sorting by month number always yields Jan through Dec, which is what you want for seasonality. For a running timeline, put a Year-Month value such as 2024-01, or the start-of-month date, on the axis instead; dates and zero-padded keys sort correctly on their own.

Do I have to redo this after every data refresh?

No. The Sort by column setting is saved in the model and survives refreshes and publishing. Only structural changes — recreating the Month column or renaming fields — require setting it up again.

Does this fix slicers and other visuals too?

Yes. Because the sort rule lives on the column in the model, every visual, filter dropdown, and slicer that uses Month follows the same Jan-to-Dec order automatically.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More