How to Select Both Year and Month in Tableau 93

Cody Schneider5 min read

Building an interactive dashboard in Tableau often means giving your users a way to slice and dice data, and filtering by date is at the top of that list. While Tableau's default date filters are powerful, they often lead to dropdown menus for the year and then another dropdown menu for the month selections, adding extra clicks and dashboard clutter. This article will show you how to combine year and month into a concise, single-control filter in Tableau for an easy-to-use dashboard experience.

Start With A Clean-Cut Filter From Your Original Date Field

When you place your primary date field (let's use the 'Order Date' field from Tableau's Sample Superstore dataset) into the Filters menu, you'll be greeted with a handful of valuable options.

With one screen to navigate, you can easily control how your data will eventually make its appearance in one of your views, which makes life easy since these options can simplify complex decisions and calculations:

  • Relative dates - For dynamic filters like "last 4 months."
  • Range of dates - Ideal for sliders, offering users control over the data.
  • Date parts - For discrete items like ‘Year’, ‘Quarter’, ‘Month’, etc.
  • Attribute - This option will take the actual date data (e.g., March 25th, 2024) as an option in your filter. This is perfect for more detailed analysis with day-level reporting for things like A/B ad campaign testing.

Although these options give you significant control over how date attributes are featured in your filter panes and any subsequent drill-downs, it can still keep you from providing users with specific insights at a glance. Having precise reporting demands like checking the previous week’s performance at the start of a new work week is essential.

There are two approaches to handling these specific reporting demands without overwhelming yourself with backend tasks: tackling everything directly through Tableau or taking care of your work before creating a new sheet. We’ll cover both here.

The Power of Calculated Fields for New Ways of Dealing With Time

At the center of any great Tableau analysis are well-structured, clear calculated fields. Instead of considering time as just day, month, and year information, add a business perspective from these new date values. Using Tableau's calculated fields with logical operators and business goals allows you to transform simple date parts into informative reports that aid decision-making.

Although our focus here is on creating sophisticated calculated fields using dates, the feature has limitless potential. You can create unique KPIs and measures that other businesses might not even think to use, giving you a competitive edge.

Making a Combined Field to Tackle a Date Range Over Time

For needs that cover multiple years of service, combining time information could lead to faster analysis and reporting. If your business performance or team metrics have been trending over years, combining this data will give you a comprehensive view of trends, making it easier to manage ongoing updates without resetting each January.

Using a Calculated Field to Get Your Order Date Data Set Up

1. Create Your Field That Will String Your Needed Information

The beauty of Tableau is that nothing is permanent at the worksheet or view stage, it's an opportunity to test new ideas. Start by opening a "Calculated Field…" option by right-clicking on your data pane in your workspace. Let’s name this new field ‘Order Date for Chronological Time’ to get started.

2. The Easy Part: Setting up The Numbers That Matter

Our objective is to combine day, month, and year into a single series of numbers, much like serial numbers in production. Tableau handles dates efficiently, so let’s use this capability.

(YEAR([Order Date])*10000)+(MONTH([Order Date])*100)+DAY([Order Date])

This formula creates a single number that helps sequence dates more straightforwardly. It ensures dates are ordered correctly, allowing you to analyze trends more easily. Instead of handling dates as specific instances, sequence them for clarity, using arithmetic rather than complex formulas for better aggregation.

3. Making it Legible for Everyone

While previous logic might leave things complex at a glance, use Tableau’s date tools to format this data more accessibly.

STR(DATENAME('month', [Order Date])) + ", " + STR(YEAR([Order Date]))

Using this calculation adds legibility and transforms numbers into intuitive, user-friendly formats for filters. A date like "20231101" transforms to a readable format like "November, 2023," easily understood by everyone.

4. Organize Your Data

After setting up your strings, assign sorting rules to enforce logical data presentation. Access "Default Properties" for ‘sort’ to apply the logic from our calculations. This ensures a coherent view of your data, allowing you to navigate confidently without confusion.

While this guide doesn’t detail every aspect of Tableau, it offers a direct way to master date manipulation. You can experiment freely with your data, creating advantages over more rigid methods that may otherwise restrict you.

Final Thoughts

Creating custom date and time logic should be straightforward, giving you more flexibility rather than relying on forums or tutorials for answers that a custom solution could provide more efficiently. Date munging and calculated fields allow you to manage reporting demands with ease.

While mastering Tableau calculations provides ultimate control, sometimes you need quick, straightforward answers. This is where a stress-free AI-native solution, like Graphed, can seamlessly connect your marketing and sales stack, providing automatic dashboards and updates without manual intervention.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.