How to Get Current Date in Tableau Calculated Field

Cody Schneider8 min read

Adding the current date to a Tableau dashboard might seem like a small detail, but it’s a powerful way to make your visualizations dynamic and always relevant. This capability unlocks a range of possibilities, from an elegant "data is current as of..." title to complex filters for year-to-date analysis. This tutorial will walk you through exactly how to get the current date using calculated fields in Tableau, providing practical examples you can use right away.

Understanding Tableau's Date Functions: TODAY() vs. NOW()

Before creating a calculated field, it's essential to know the two primary functions Tableau offers for retrieving the current date and time: TODAY() and NOW(). Though they sound similar, they serve different purposes.

The TODAY() Function

The TODAY() function is the one you'll use most of the time. It returns only the current date, with no time component. For example, if you run it on October 26, 2023, it will return "10/26/2023".

  • Best For: Date-level calculations, creating dynamic filters (e.g., Year-to-Date), and displaying the report's "as of" date.
  • Formula: TODAY()

The NOW() Function

The NOW() function is more specific. It returns the current date and the current time. On October 26, 2023, at 10:45 AM, it would return "10/26/2023 10:45:00 AM".

  • Best For: Timestamp-level analysis, recording the exact time of a data refresh, or calculations where time is a critical factor.
  • Formula: NOW()

For most reporting, TODAY() is clearer and avoids potential complications with time zones or mismatched date and datetime data types. We will focus on the TODAY() function throughout this guide.

How to Create a Calculated Field for the Current Date

Creating a calculated field is a fundamental skill in Tableau. Follow these simple steps to add a dynamic field that always shows the current date.

  1. Open the Calculated Field Dialogue Box: In your Tableau workbook, you can do this in two ways:
  2. Name Your Calculated Field: In the dialogue box that appears, give your field a descriptive name. Something intuitive like "Current Date" or "Today's Date" works perfectly. A good name helps you (and your teammates) quickly identify its purpose later.
  3. Enter the Formula: In the main formula box, type the function to get the current date. As discussed, you'll most often use:
  4. Save the Field: Click OK to save your new calculated field.

That’s it! Your "Current Date" field will now appear in the Data pane, usually identified by an "=" sign next to its icon, signaling it's a calculation. You can now drag and drop this field into your worksheets just like any other data field.

Practical Use Cases for a Current Date Field

Simply having the current date is just the first step. The real power comes from incorporating it into your dashboards to make them more interactive, informative, and automatic. Here are a few practical examples.

1. Creating Dynamic Dashboard Titles

A common request is to show when your data was last updated. Instead of manually typing the date, you can use your new calculated field to keep your titles current.

How to do it:

  1. Open the worksheet whose title you want to update.
  2. Drag your [Current Date] calculated field onto the Detail square in the Marks card. This makes the field available to the worksheet without altering the visualization itself.
  3. Double-click the worksheet title to open the Edit Title dialogue box.
  4. Type your static text, like "Sales Performance Updated On: " and then click the Insert button on the right.
  5. From the drop-down menu, select your calculated field (e.g., ATTR(Current Date)).
  6. Click OK.

Now, your title will automatically update to something like "Sales Performance Updated On: October 26, 2023" every time the data is refreshed.

2. Filtering for Recent Activity (YTD, MTD, etc.)

The TODAY() function is the foundation for almost all relative date calculations that business dashboards rely on. You can use it to build powerful filters that isolate specific time periods automatically.

Example: Filtering for Year-to-Date (YTD) Sales

To create a measure that only shows sales from the beginning of the current year up to today, create another calculated field:

  1. Create a new calculated field and name it "YTD Sales".
  2. Enter the following formula:

IF [Order Date] <= TODAY() AND DATEDIFF('year', [Order Date], TODAY()) = 0 THEN [Sales] END

This formula checks two conditions:

  • [Order Date] <= TODAY(): Ensures we only look at orders that happened on or before today.
  • DATEDIFF('year', [Order Date], TODAY()) = 0: Calculates the difference in years between a specific order date and today. If the difference is zero, it means the order occurred in the current year.

You now have a dynamic YTD Sales measure that never needs to be manually updated.

3. Highlighting Data from the Last 7 Days

Want to draw attention to recent activity? You can create a boolean (True/False) calculated field to identify and color-code records from the past week.

How to do it:

  1. Create a calculated field and name it something like "Recent Activity?".
  2. Use this simple formula:

DATEDIFF('day', [Order Date], TODAY()) <= 7

This formula calculates the number of days between the order date and today. If that number is 7 or less, it returns True, otherwise, it returns False.

  1. Drag this new [Recent Activity?] field onto the Color square in the Marks card.
  2. Click on the Color Legend to assign distinct colors to "True" and "False" values, making your recent data points pop visually.

4. Calculating Days Until an Event or Deadline

Your "current date" calculation isn't just for looking backward, it can also look forward. This is useful for project management dashboards, event planning, or tracking delivery timelines.

How to do it:

Assuming you have a field in your data source called [Project Deadline], you can calculate the days remaining:

  1. Create a calculated field named "Days Remaining".
  2. Enter the formula:

DATEDIFF('day', TODAY(), [Project Deadline])

This formula calculates the difference between today and the deadline, giving you a countdown. You can display this number in a table or use it in other calculations to flag projects that are at risk.

Common Pitfalls and Best Practices

Using TODAY() is straightforward, but there are a few nuances to be aware of to avoid incorrect or misleading results.

Live Connections vs. Extracts: The "Static Date" Problem

This is the most critical concept to understand: The value returned by TODAY() is determined when the data source is refreshed, not when a user opens the dashboard in their browser.

  • With a Live Connection: TODAY() will use the date from your database's server. Every time you open or refresh the viz, Tableau queries the database live, so the date is generally current.
  • With a Tableau Extract (.hyper): TODAY() returns the date when the extract was last refreshed. If you have an extract that only refreshes once a day, your "Current Date" field will show yesterday's date until the next scheduled refresh. It is not truly "live." Make sure your extract refresh schedule aligns with your reporting needs.

Data Type Mismatches

Be mindful of comparing date fields with datetime fields. For example, if your [OrderDate] field contains timestamps (e.g., '10/25/2023 09:00:00 AM'), it's a datetime field. This formula DATEDIFF('day', [OrderDate], TODAY()) may not behave exactly as you expect.

To ensure you're comparing dates to dates, you can strip the time component from your datetime field using the DATE() function. For example:

DATE([OrderDate]) <= TODAY()

This converts the datetime value to a simple date value for a clean comparison.

Be Aware of Timezones

While TODAY() is generally safe from timezone issues because it has no time component, the NOW() function is not. The date and time returned by NOW() depend on the server running the refresh. If your Tableau Server is in UTC but your users are in PST, the date returned by NOW() could be a day ahead for part of the day. Stick with TODAY() unless you specifically need and can control for timestamp-level precision.

Final Thoughts

Mastering the TODAY() function in Tableau shifts your dashboards from static snapshots to dynamic, living reports. From simple title updates to complex year-to-date calculations, this single function is a cornerstone of effective business intelligence, enabling you to deliver consistently relevant insights without manual intervention.

Of course, building and managing dashboards across many different tools becomes challenging as your data grows. Juggling data refreshes, writing calculated fields, and connecting different platforms is where most of us spend our time, instead of focusing on what the data actually says. Here’s where we built Graphed to help. We automate that entire process by connecting to all your data sources and allowing you to build real-time dashboards just by describing what you need in plain English - no tricky formulas needed.

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.