Tableau Deep Dive: Dates - Exact Dates - InterWorks (2024)

Table of Contents
Exactly What is Exact Date? Let’s Be Discrete Use Case: Testing for hom*ogeneity What’s Next? Want More Tableau Deep DivesTableau Deep Dive: LOD – Introduction to DetailTableau Deep Dive: LOD – The Include CalculationTableau Deep Dive: LOD – The Exclude CalculationTableau Deep Dive: LOD – The Fixed CalculationTableau Deep Dive: LOD – LOD Calculations vs. Table CalculationsTableau Deep Dive: Parameters – Parameter OverviewTableau Deep Dive: Parameters – Parameter PropertiesTableau Deep Dive: Parameters – Filtering – Top NTableau Deep Dive: Parameters – Calculated FieldsTableau Deep Dive: Parameters – Filtering Across Data SourcesTableau Deep Dive: Parameters – BinsTableau Deep Dive: Parameters – Reference LinesTableau Deep Dive: Parameters – Table CalculationsTableau Deep Dive: Sets – Introduction to SetsTableau Deep Dive: Sets – Constant SetsTableau Deep Dive: Sets – Computed SetsTableau Deep Dive: Sets – IN/OUTTableau Deep Dive: Sets – Combined SetsTableau Deep Dive: Sets – Calculated FieldsTableau Deep Dive: Sets – HierarchiesTableau Deep Dive: Dates – Introduction to DatesTableau Deep Dive: Dates – Preparing DatesTableau Deep Dive: Dates – More Date FunctionsTableau Deep Dive: Dates – Exact DatesTableau Deep Dive: Dates – Custom DatesTableau Deep Dive: Dates – Rolling DatesTableau Deep Dive: Dates – Calendar FiltersTableau Deep Dive: Dates – Week-by-Week ComparisonTableau Deep Dive: Dashboard Design – PlanningTableau Deep Dive: Dashboard Design – Proof of ConceptTableau Deep Dive: Dashboard Design – Adding InteractivityTableau Deep Dive: Dashboard Design – Visual Best PracticesTableau Deep Dive: Dashboard Design – PublishingTableau Deep Dive: Table Calculations – Custom Sorts, Part OneTableau Deep Dive: Table Calculations – Custom Sorts, Part TwoTableau Deep Dive: Table Calculations – Custom Sorts, Part Three

Tableau Deep Dives are a loose collection of mini-series designed to give you an in-depth look into various features of Tableau Software.

We’re continuing our Deep Dive into Dates with an examination of the Exact Date value. Remember to catch up on the previous three articles where I introduced dates (discrete vs. continuous) and some key date functions. Let’s get started!

Exactly What is Exact Date?

In our first article, we learned the difference between discrete and continuous dates. Discrete dates use date parts to form a hierarchy. If have all of the date parts possible for that date, then I can get a specific date (or date and time). Continuous dates use date values to determine their level of detail. You’re using a timeline either way, but date values determine the unit of measure of how you’re going to group your aggregated data.

Exact date is a date value, which makes it by default a continuous date. Think of it as a specific point on the timeline. It is the lowest level of detail possible for your data type. For date, it is all the way down to the day level. For date and time, you’re going down to seconds.

Let’s look at a discrete date hierarchy that is completely expanded down to the lowest level:

Tableau Deep Dive: Dates - Exact Dates - InterWorks (1)

You can see immediately this is a very inefficient way to display the data. Even if we changed the above view from a bar chart to a line graph, each level of the date part hierarchy is creating a row header that has to be displayed.

Let’s show our sales data using exact date, which is by default continuous:

Tableau Deep Dive: Dates - Exact Dates - InterWorks (2)

Right away you should notice that our Order Date field has no qualifying date part or date value on it. It simply says Order Date. That’s how we know it is the exact date in the data source.

This is much easier to digest. The difference with a continuous date is that even though are mapping all of the data points, our view gives us the flexibility to view all of the data by compressing them into the viewable area. Without having to worry about headers, Tableau can automatically adjust the axis tick marks for the allowable space. If we compressed our discrete date into Fit Entire view, it’d be unreadable.

The date field in Sample – Superstore has the date data type, which means it only goes down to day. In this instance, exact date would be the same as setting your date value in your continuous date field to Day().

Let’s Be Discrete

I said that exact dates are by default continuous. That doesn’t mean they can’t be discrete, too. It’s opposite day and anything is possible. When you right-click on a date field, you get the option of choosing a discrete date (i.e. date part) or a continuous date (i.e. date value):

Tableau Deep Dive: Dates - Exact Dates - InterWorks (3)

Even though I have these labeled as discrete and continuous that is there default setting. These can be changed. If you look below, you’ll see a toggle between Discrete and Continuous here:

Tableau Deep Dive: Dates - Exact Dates - InterWorks (4)

Let’s use this to hardcode our continuous exact date to be a discrete field. It will allow us to use the most granular date value as a header in our view. To help illustrate this, I’m going to switch our exact date view from above. Instead of our date field being on Columns, I’m going to put it on Rows (like we did with our date part hierarchy):

Tableau Deep Dive: Dates - Exact Dates - InterWorks (5)

Notice how Order Date is now a blue field on rows. You can see that we don’t to have arrive a specific date cobbled together with different date parts to get a header. Instead, we get a nice clean date for each header.

Use Case: Testing for hom*ogeneity

Let’s use our discrete exact date as row headers for a sample analysis. I’m interested in seeing every day where we had multiple orders. Let’s take Order ID and drag it onto our view to create a text table:

Tableau Deep Dive: Dates - Exact Dates - InterWorks (6)

Each Order ID is now listed on our discrete exact date. Let’s add the ATTR() to Order ID function to test for hom*ogeneity. Any day that has more than one Order ID is going to show us as an asterisk. Any date that has a single Order ID is going to return that single id. You can learn more about the ATTR() function in an article written by my InterWorks teammate, Tim Costello.

Tableau Deep Dive: Dates - Exact Dates - InterWorks (7)

Let’s move our ATTR(Order ID) up to the Filters card and make sure we select Attribute when it prompts us on what type of filter we want:

Tableau Deep Dive: Dates - Exact Dates - InterWorks (8)

Then we can filter for only days that have multiple orders:

Tableau Deep Dive: Dates - Exact Dates - InterWorks (9)

We are now filtering out all dates that did not have multiple orders. To make our view useful, let’s analyze how many orders occur on average on multi-order days and which day they most likely occur on. Let’s start by adding a CNTD(Order ID) on our label:

Tableau Deep Dive: Dates - Exact Dates - InterWorks (10)

Next, let’s calculate the % of total that multi-order days happen on which weekdays. To do this we’ll use a level of detail calculation:

Tableau Deep Dive: Dates - Exact Dates - InterWorks (11)

In this calculation, I’m breaking each order into each weekday and then dividing by the whole of the data source to get an accurate % of total. Let’s finish up our view by including our LOD calculation into the text table and adding a single value drop-down list for Weekday:

Tableau Deep Dive: Dates - Exact Dates - InterWorks (12)

Looking at our data, some assumptions are probably confirmed. We sell office supplies primarily and the largest bulk of our orders are during business days, especially Monday at nearly 29%. Sunday is a measly 3.29%. That gives a strong indication our customers are ordering while at work.

What’s Next?

In our next article, we’ll tackle custom dates. Custom dates allow us to choose a persistent date part or date value for our newly created calculated date field. Until then, please put any thoughts or questions in the comments section below.

Want More Tableau Deep Dives
  1. Tableau Deep Dive: LOD – Introduction to Detail
  2. Tableau Deep Dive: LOD – The Include Calculation
  3. Tableau Deep Dive: LOD – The Exclude Calculation
  4. Tableau Deep Dive: LOD – The Fixed Calculation
  5. Tableau Deep Dive: LOD – LOD Calculations vs. Table Calculations
  6. Tableau Deep Dive: Parameters – Parameter Overview
  7. Tableau Deep Dive: Parameters – Parameter Properties
  8. Tableau Deep Dive: Parameters – Filtering – Top N
  9. Tableau Deep Dive: Parameters – Calculated Fields
  10. Tableau Deep Dive: Parameters – Filtering Across Data Sources
  11. Tableau Deep Dive: Parameters – Bins
  12. Tableau Deep Dive: Parameters – Reference Lines
  13. Tableau Deep Dive: Parameters – Table Calculations
  14. Tableau Deep Dive: Sets – Introduction to Sets
  15. Tableau Deep Dive: Sets – Constant Sets
  16. Tableau Deep Dive: Sets – Computed Sets
  17. Tableau Deep Dive: Sets – IN/OUT
  18. Tableau Deep Dive: Sets – Combined Sets
  19. Tableau Deep Dive: Sets – Calculated Fields
  20. Tableau Deep Dive: Sets – Hierarchies
  21. Tableau Deep Dive: Dates – Introduction to Dates
  22. Tableau Deep Dive: Dates – Preparing Dates
  23. Tableau Deep Dive: Dates – More Date Functions
  24. Tableau Deep Dive: Dates – Exact Dates
  25. Tableau Deep Dive: Dates – Custom Dates
  26. Tableau Deep Dive: Dates – Rolling Dates
  27. Tableau Deep Dive: Dates – Calendar Filters
  28. Tableau Deep Dive: Dates – Week-by-Week Comparison
  29. Tableau Deep Dive: Dashboard Design – Planning
  30. Tableau Deep Dive: Dashboard Design – Proof of Concept
  31. Tableau Deep Dive: Dashboard Design – Adding Interactivity
  32. Tableau Deep Dive: Dashboard Design – Visual Best Practices
  33. Tableau Deep Dive: Dashboard Design – Publishing
  34. Tableau Deep Dive: Table Calculations – Custom Sorts, Part One
  35. Tableau Deep Dive: Table Calculations – Custom Sorts, Part Two
  36. Tableau Deep Dive: Table Calculations – Custom Sorts, Part Three

Tableau Deep Dive: Dates - Exact Dates - InterWorks (2024)
Top Articles
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated:

Views: 5667

Rating: 4.4 / 5 (75 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.