Advance with Assist: NOW and TODAY Functions in Tableau

Data

Advance with Assist: NOW and TODAY Functions in Tableau

Advance with Assist shares quick solutions to common challenges encountered by the InterWorks Assist on-demand team.

Question: I’m using the NOW function to show the current date and time in an analysis I’m building for our assembly line, but when I add to my report, it’s showing me all data for all of time. How can I get this to show me only what’s current?

The NOW function returns the current date and time. It’s a nice function for use in time-sensitive analyses since it gives you the ability to grab the current date and time:

NOW function in Tableau

When I place this in Tableau, it gives me the current date and time. So you can see that I’m writing this blog on 4/22 at 10:34:

NOW function in Tableau

For the purposes of answering this question, I’ll be using Superstore as my dataset. When I add sales to my report, NOW updates, but it shows the full year like in our original Assist request:

NOW function in Tableau

The key here is understanding what you’ve built in Tableau. You are adding metadata to every row in the database, but the NOW function is a constant for the workbook and will repeat on every row of data. TODAY is another common function for grabbing the current date when time isn’t important when loading a dashboard. I’ll add Order Date to the view to illustrate this:

NOW and TODAY functions in Tableau

In discussing this request with the user, what they were after was how many products had been produced since the beginning of the shift. They had a column in their data with the shift start date and time and wanted now to show the accumulation.

To attain the desired result, we used the following:

  • a calculated field with the shift start-time field that had been selected via filter
  • the NOW field to create a Boolean calculation we could then select TRUE for

[Product Produce Timestamp] >= [Shift Start] AND [Product Produce Timestamp] <= [NOW]

Want More Advance with Assist

  1. Advance with Assist: Filtering Select Dates with DATETRUNC
  2. Advance with Assist: Enhancing Dashboards with Custom Icons
  3. Advance with Assist: Tableau Power User Leaving the Company
  4. Advance with Assist: Context Filters and LOD Calculations
  5. Advance with Assist: Custom Subscriptions with Tableau Server Custom Views
  6. Advance with Assist: Blending with Dimension Not Utilized
  7. Advance with Assist: Creating a Sankey Diagram from Survey Data
  8. Advance with Assist: Multiple Dashboard Actions with a Single Click
  9. Advance with Assist: Refreshing Tableau Online Data with Tableau Bridge
  10. Advance with Assist: Parameter Performance Optimization
  11. Advance with Assist: Using Custom Backgrounds with Polygon Shapefiles
  12. Advance with Assist: Changing Default Properties on Data
  13. Advance with Assist: Options for Calculating Percentages
  14. Advance with Assist: Removing Options from Filter List
  15. Advance with Assist: Extracting Year from De-identified Text String
  16. Advance with Assist: Marking the Latest Date on Trend Line
  17. Advance with Assist: What You Need to Know About Aliases
  18. Advance with Assist: Function Compatibility
  19. Advance with Assist: Mass Parameter Replacement
  20. Advance with Assist: Sorting with MONTH in Reverse
  21. Advance with Assist: Ungroup Column Headers That Have Concatenated
  22. Advance with Assist: Connectionless Failure Error in Tableau Server
  23. Advance with Assist: How to Exceed Tableau’s Column or Row Limit
  24. Advance with Assist: Adding Email Links to Your Dashboard
  25. Advance with Assist: Saving User-Selected Filters on Tableau Server
  26. Advance with Assist: Tableau and Named Ranges in Excel
  27. Advance with Assist: Editing Custom Fields in Tableau-Published Data Sources
  28. Advance with Assist: NOW and TODAY Functions in Tableau
  29. Advance with Assist: Sheet Swapping with Dummy Headers
  30. Advance with Assist: REST Error in Tableau and Snowflake Connection

More About the Author

Dustin Wyers

Analytics Consultant | Assist Lead - East
Advance with Assist: REST Error in Tableau and Snowflake Connection Question: I’m getting an error when I try to log into Snowflake. It says REST error and no such file or directory. How can I get ...
Advance with Assist: Sheet Swapping with Dummy Headers Question: I’m trying to use a sheet swap toggle between two chart types, but in the layout container, the sheet is keeping space and ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072