How to Get Month Name in Tableau
Displaying the month name from a date in Tableau seems simple, but it can be one of those surprisingly stubborn tasks. Whether you need the full name for a report header or an abbreviation for a chart axis, there are a few ways to get it done. This guide will walk you through the most common methods, from simple formatting clicks to flexible calculated fields, so you can display your dates exactly how you want.
The Simplest Method: Using Tableau's Drag-and-Drop Formatting
For most basic charts and tables, you don't need to write a single formula. Tableau’s built-in date formatting is smart enough to handle this for you with just a couple of clicks. This is the fastest way to get month names into your view.
Step-by-Step Instructions:
- Drag Your Date to the View: Start by dragging your date field (e.g., "Order Date") from the Data pane onto the Columns or Rows shelf.
- Select the Right Date Part: Tableau will likely default to showing the YEAR of the date. To change this, right-click (or option-click on a Mac) the blue YEAR(Order Date) pill. A context menu will appear.
- Choose 'Month': In the top section of the menu, you'll see options for Year, Quarter, Month, Day, and More. Hover over "Month" and you will see two options:
For getting just the month name, always choose the first Month option (e.g., "May"). Tableau will update your view to show headers for each month based on the data available.
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.
Discrete vs. Continuous Dates (Blue vs. Green Pills)
You may notice the pill on your shelf is either blue or green. This is an important distinction in Tableau:
- Blue Pills (Discrete): Think of these as categories or labels. When you choose the discrete "Month," you get a separate column or row for "January," "February," etc. They are treated as individual text labels.
- Green Pills (Continuous): These represent a continuous range. A continuous month view creates an axis that flows from one month to the next in chronological order.
For displaying a non-abbreviated month name as a header (e.g., in a bar chart), the discrete (blue) pill is the way to go.
Advanced Control: Using Calculated Fields
What if you need more flexibility? Sometimes you need to use the month name inside another calculation, create a custom label, or simply want a separate, reusable field for "Month Name." In these cases, a calculated field is your best friend.
Using the DATENAME() Function
The DATENAME() function is the perfect tool for this job. It returns the name of a specific part of a date as a string of text. This is what you'll use to pull out "January" as a text value from a date like '2024-01-15'.
How to Create the Calculated Field:
- In the Data pane (the sidebar on the left), right-click on an empty space and select "Create Calculated Field."
- A dialog box will open. Give your new field a descriptive name, like "Month Name."
- In the formula editor, type the following expression:
- The calculation should show as valid. Click "OK."
You now have a brand new dimension in your Data pane called "Month Name." You can drag and drop this field onto your view just like any other field. It will contain the text values "January," "February," "March," and so on.
How to Get Abbreviated Month Names (e.g., Jan, Feb, Mar)
The DATENAME() function only returns the full month name. If you need a three-letter abbreviation, you can easily create it by combining DATENAME() with the LEFT() function, which grabs a specified number of characters from the beginning of a text string.
- Create another calculated field and name it "Month Abbreviation."
- Use the following formula:
- Click "OK."
This formula first gets the full month name ("January") and then LEFT() trims it down to the first three characters ("Jan").
The #1 Problem (and How to Fix It): Chronological Sorting
You've created your "Month Name" calculated field, dragged it to your view, and... wait. Your months are sorted alphabetically: April, August, December, February. This happens because your calculated field is a string, and Tableau defaults to sorting strings alphabetically.
This is arguably the most common follow-up problem everyone encounters. Luckily, there's an easy and permanent fix.
Step-by-Step Sorting Fix:
- Create a "Month Number" Field: We need a numeric field to tell Tableau the correct order. Create another calculated field named "Month Number" using the
DATEPART()function.DATEPART()returns an integer for the date part. - Set Default Sort Order: Now, go back to your "Month Name" field in the Data pane.
Now, whenever you drag your "Month Name" field into a view, it will automatically sort chronologically from January to December. You only have to do this once, and it will work correctly across your entire workbook.
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.
DATENAME vs. DATEPART: What's the Difference?
This is a core concept in Tableau that's good to remember:
DATENAME('month', [Order Date])returns a string: "January".DATEPART('month', [Order Date])returns a number (integer): 1.
Use DATENAME when you need the actual name of the month for display. Use DATEPART when you need the numerical value for sorting, calculations, or filtering.
Final Thoughts
Working with dates in Tableau is all about knowing which tool to use for the job. For a quick visual, right-clicking the date pill is the fastest way to display month names. For more advanced use cases that require flexibility and proper sorting, combining DATENAME() and DATEPART() in calculated fields gives you complete control over your viz.
In our experience, pulling specific details like month names is a frequent requirement in reporting, but it often gets stuck in tool-specific complexities. At Graphed, we've designed an experience where you don't even have to think about formulas or sorting options. You can simply connect your data and ask things like, "Show our website sessions by month name this year," and the correct, chronologically-sorted chart is built for you in seconds. We handle the technical wrangling so you can get straight to the insights.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.