How do sales trends change over time when using continuous versus discrete dates in Tableau?
Sample Data
Date
Region
Sales
2024-01-01
North
100
2024-01-02
North
150
2024-01-03
South
200
2024-01-04
South
250
2024-01-05
East
300
2024-01-06
East
350
2024-01-07
West
400
2024-01-08
West
450
Dashboard Components
KPI Card:Total Sales = SUM([Sales]) = 2200
Line Chart (Continuous Dates): Shows sales trend over time with a smooth timeline axis using continuous dates (Date as a green pill). This axis treats dates as a continuous timeline, showing gaps if any dates are missing.
Bar Chart (Discrete Dates): Shows sales by each date as separate bars using discrete dates (Date as a blue pill). Each date is a separate category on the axis.
Table: Lists Date, Region, and Sales for detailed view.
Dashboard Layout
+----------------------+-----------------------+
| Total Sales | Line Chart (Continuous) |
| (KPI Card) | |
+----------------------+-----------------------+
| Bar Chart (Discrete Dates) |
| |
+----------------------------------------------+
| Data Table |
+----------------------------------------------+
Interactivity
A date filter allows selecting a date range. Both charts and the table update to show only data within the selected dates.
Selecting a region from a region filter updates all components to show sales only for that region.
Hovering over points or bars highlights the corresponding date and sales value.
The continuous date line chart smoothly shows trends over time, while the discrete date bar chart shows exact sales per date.
Self Check
If you add a filter to show only the dates from 2024-01-03 to 2024-01-06, which components update and what changes do you see?
All components update: KPI card total sales changes to 1100 (200+250+300+350).
Line chart shows a continuous timeline only for these dates.
Bar chart shows bars only for these four dates.
Data table lists only rows with dates 2024-01-03 to 2024-01-06.
Key Result
Dashboard comparing sales trends using continuous and discrete dates in Tableau with interactive filters.
Practice
(1/5)
1. In Tableau, what color pill represents a continuous date field on the Columns or Rows shelf?
easy
A. Green pill
B. Blue pill
C. Red pill
D. Yellow pill
Solution
Step 1: Understand Tableau date pill colors
Tableau uses green pills for continuous fields and blue pills for discrete fields.
Step 2: Identify continuous date pill color
Continuous dates appear as green pills to show smooth timelines.
Final Answer:
Green pill -> Option A
Quick Check:
Continuous date = Green pill [OK]
Hint: Continuous dates always show as green pills in Tableau [OK]
Common Mistakes:
Confusing continuous with discrete pill colors
Thinking blue pills represent continuous dates
Assuming color depends on data type, not continuous/discrete
2. Which of the following is the correct way to convert a date field to discrete in Tableau?
easy
A. Right-click the date field and select 'Convert to Continuous'
B. Right-click the date field and select 'Convert to Discrete'
C. Drag the date field to Filters shelf
D. Double-click the date field to create a continuous axis
Solution
Step 1: Locate conversion options for date fields
In Tableau, right-clicking a date field shows options to convert between continuous and discrete.
Step 2: Select the correct conversion for discrete
Choosing 'Convert to Discrete' changes the pill color to blue and treats dates as categories.
Final Answer:
Right-click the date field and select 'Convert to Discrete' -> Option B
Quick Check:
Convert to Discrete = Right-click the date field and select 'Convert to Discrete' [OK]
Hint: Right-click date field to toggle continuous/discrete [OK]
Common Mistakes:
Selecting 'Convert to Continuous' instead of discrete
Dragging to Filters shelf does not change continuous/discrete
Double-clicking creates continuous axis by default
3. Given a line chart with a continuous date on Columns and Sales on Rows, what happens if you change the date to discrete?
medium
A. The chart shows a smooth timeline with connected points.
B. The chart becomes empty because discrete dates are invalid.
C. The chart breaks into separate bars for each date value.
D. The chart shows a scatter plot with random points.
Solution
Step 1: Understand continuous date behavior in line charts
Continuous dates create a smooth timeline with connected points forming a line.
Step 2: Understand discrete date behavior in line charts
Discrete dates treat each date as a separate category, breaking the line into separate bars or marks.
Final Answer:
The chart breaks into separate bars for each date value. -> Option C
Quick Check:
Discrete date = separate categories [OK]
Hint: Discrete dates split timeline into separate categories [OK]
Common Mistakes:
Expecting a smooth line with discrete dates
Thinking discrete dates create scatter plots
Assuming discrete dates cause errors or empty charts
4. You created a line chart with a continuous date but the axis shows unexpected gaps. What is the most likely cause?
medium
A. The date field is actually discrete, not continuous.
B. The date field is formatted as text.
C. The Sales measure is aggregated incorrectly.
D. There are missing dates in the data causing gaps.
Solution
Step 1: Check date field type
Continuous dates create smooth axes; if gaps appear, the field is likely continuous, not discrete.
Step 2: Identify cause of gaps
Missing dates in the data cause breaks in continuous timelines, showing gaps on the axis.
Final Answer:
There are missing dates in the data causing gaps. -> Option D
Quick Check:
Missing dates cause gaps in continuous axis [OK]
Hint: Gaps in continuous axis usually mean missing dates [OK]
Common Mistakes:
Assuming date field is discrete when it's continuous
Thinking text formatting causes axis gaps
Blaming measure aggregation for axis gaps
5. You want to compare sales performance by month as distinct groups and also see the overall sales trend over time. How should you use continuous and discrete dates in your Tableau dashboard?
hard
A. Use discrete month for the bar chart and continuous month for the line chart.
B. Use continuous month for both charts to keep consistency.
C. Use discrete month for both charts to show clear categories.
D. Use continuous month for the bar chart and discrete month for the line chart.
Solution
Step 1: Understand visualization goals
Comparing sales by month as distinct groups fits discrete dates (blue pills) for clear categories.
Step 2: Understand trend visualization
Showing overall sales trend over time fits continuous dates (green pills) for smooth timelines.
Step 3: Apply correct date types per chart
Use discrete month for bar chart to compare groups, continuous month for line chart to show trend.
Final Answer:
Use discrete month for the bar chart and continuous month for the line chart. -> Option A