Tutorials › Tableau › Line Charts & Time-Series Analysis

Line Charts & Time-Series Analysis

Build line charts that show trends over time — the most used chart type in business analytics. Learn to handle date fields, dual-line comparisons, and trend lines.

Line charts are the most natural way to show how a measure changes over time. In Tableau, the moment you place a date field on the Columns shelf and a measure on the Rows shelf, Tableau automatically connects the points and draws a line — but the detail level (year vs month vs day) is controlled by how you set up the date field.

A common beginner mistake is dragging a date field onto the shelf and getting a single dot — a year-level aggregate. The fix is simple: right-click the date pill on the shelf and select the level of detail you need (Month, Week, Day). This chapter explains that behaviour and shows you how to build line charts that communicate clearly at the right grain.

What you will learn
  • How Tableau handles date fields — YEAR, QUARTER, MONTH, DAY truncation
  • Building a basic sales trend line from scratch
  • Adding a second measure as a second line (colour encoding)
  • Using the Pages shelf for animated time playback
  • Adding trend lines and forecast bands
  • Formatting axes, gridlines, and tooltip for clean presentation

Steps to build a monthly revenue trend line

1. Connect to the EVIKA Orders table (or your dataset).

2. Drag ORDER_DATE to Columns shelf.
   → Tableau defaults to YEAR(Order Date). Right-click the pill
     → select "Month" under the CONTINUOUS section (blue pill).
   → You now have a continuous monthly axis.

3. Drag REVENUE (or SUM of a numeric field) to Rows shelf.
   → Tableau draws a single connected line across months.

4. On the Marks card, verify Mark Type = Line.
   (Tableau usually auto-selects this for date + measure combinations.)

5. To add data point markers:
   → Click the Marks card → Color or Size → turn on "Show marks"
   OR change Mark Type to "Circle" and reduce the size.

6. Add labels: Drag REVENUE to the Label shelf on the Marks card.
   → Set label to "Min/Max only" to avoid clutter:
     Label shelf → click the dropdown → Min/Max.

Date pill — Discrete (blue) vs Continuous (green)

When you right-click a date pill, Tableau shows two sections:

DISCRETE (blue pill) — creates individual headers:
  YEAR(Order Date)    → one column per year
  QUARTER(Order Date) → columns: Q1, Q2, Q3, Q4
  MONTH(Order Date)   → columns: January, February, …

CONTINUOUS (green pill) — creates a continuous axis:
  YEAR(Order Date)    → a numeric axis of years
  MONTH(Order Date)   → axis of months in order: Jan-2025, Feb-2025 …
  DAY(Order Date)     → full date axis

For trend lines → use CONTINUOUS so Tableau draws one connected line.
For comparison by period → use DISCRETE to get separate bars or lines
  per period (e.g., January bars for 2024 vs 2025 side by side).

Two lines on one chart — comparing two measures

Method 1 — Dual Axis:
  Drag REVENUE to Rows, then drag ORDERS to Rows alongside it.
  → Tableau creates two separate row panels (one line each).
  → Right-click the second pill → Dual Axis.
  → Right-click the right axis → Synchronise Axis.
  → Both lines now share one axis. Format colours on Marks card.

Method 2 — Measure Names / Measure Values:
  Drag REVENUE and ORDERS to the Rows shelf together.
  → Tableau auto-places Measure Names on the Color shelf.
  → Both lines appear in one panel, colour-coded by measure name.
  → Rename the legend labels: double-click the field alias.

EVIKA Example:
  Compare Monthly Revenue vs Monthly Orders for 2025:
  REVENUE line → primary axis (₹)
  ORDER_COUNT line → secondary axis (count)
  Insight: orders peak in March but revenue peaks in June —
           average order value increases mid-year.

Adding a trend line and forecast

1. Build your line chart (date on Columns, measure on Rows).

2. Go to Analytics pane (tab next to Data pane).

3. Drag "Trend Line" into the view → drop on "Linear".
   → A dotted trend line appears with slope and R² displayed.

4. To customise:
   Right-click the trend line → Edit Trend Lines:
   - Model type: Linear / Logarithmic / Exponential / Power
   - Show Confidence Bands: tick the checkbox
   - Describe Trend Line: shows slope, p-value, R²

5. For forecast (future projection):
   Analytics pane → drag "Forecast" → drop on the view.
   → Tableau adds shaded bands for predicted next N periods.
   → Right-click → Forecast Options to set how many periods ahead.

Interpretation:
  R² close to 1 → strong linear trend
  p-value < 0.05 → trend is statistically significant
  Wide confidence bands → high uncertainty in the forecast

EVIKA Monthly Revenue — Sample Data for Line Chart

MonthRevenue (₹)OrdersAvg Order Value (₹)
Jan 20251,20,000482,500
Feb 202595,000382,500
Mar 20251,45,000562,589
Apr 20251,10,000412,683
May 20251,30,000442,955
Jun 20251,75,000523,365
Jul 20251,60,000473,404
Aug 20251,85,000553,364
Sep 20252,10,000613,443
Oct 20251,95,000583,362
Nov 20252,30,000643,594
Dec 20252,55,000703,643

Key Points

  • ✓Use CONTINUOUS date pills (green) for line charts — DISCRETE (blue) creates separate headers, not a connected line.
  • ✓Right-click any date pill on the shelf to change granularity between Year, Quarter, Month, Week, Day.
  • ✓Dual Axis lets you plot two different measures on the same view with independent scales — always Synchronise Axis unless the scales are intentionally different.
  • ✓Trend lines from the Analytics pane give you slope, R², and p-value — use them to tell stakeholders whether the trend is statistically meaningful.
  • ✓Never truncate a line chart axis to exaggerate a flat trend — it misleads the reader about the magnitude of change.

Tips

💡 Reduce chart noise: right-click the view → Format → Lines → set Row Dividers and Column Dividers to None.
💡 For YoY comparison on one line chart: drag YEAR to the Color shelf (discrete) — Tableau draws one line per year on a shared month axis.
💡 If your line zigzags wildly, your date granularity is too fine. Switch from DAY to WEEK or MONTH to show the underlying trend.
💡 Use Pages shelf with a date field for an animated playback of how your line changes month by month — great for presentations.

FAQ

Why does my line chart show only a single dot?
Your date field is at YEAR level with only one year in the data, so there is only one data point and nothing to connect. Right-click the date pill on the shelf → choose a finer granularity (Month or Quarter). If you still see one dot, check whether your date column is formatted as a string rather than a date — convert it in the Data Source page first.
How do I show month names instead of month numbers on the axis?
Right-click the date pill → choose the DISCRETE version of Month (blue pill). This shows January, February … as column headers. If you want Jan-2025 format, use CONTINUOUS Month — Tableau labels the axis with the full month-year by default.
How do I highlight one specific line when I have multiple lines?
Click the colour legend on the right side of the view — click one item and all others go grey. Click again to restore. For a permanent highlight, use a Highlight Action: Worksheet menu → Actions → Add → Highlight.
Practice Question

You want to compare 2024 vs 2025 monthly revenue on a single line chart where both years share the same month axis (Jan–Dec). Which approach gives you this view in Tableau?

Drag YEAR to Rows and MONTH to Columns — creates two separate panels
✅ Drag MONTH (discrete) to Columns and YEAR (discrete) to Color — one line per year on a shared axis
Drag YEAR to Columns and MONTH to Color — lines by month on a year axis
Use Dual Axis with one measure per year
Explanation: Placing MONTH (discrete) on Columns gives you Jan–Dec as the shared axis. Placing YEAR (discrete) on Color draws one line per year. Both lines share the same monthly x-axis, making the year-over-year comparison direct and easy to read.
← Bar Charts in TableauScatter Plots & Dual-Axis Charts →
Want live Tableau training?
EVIKA Academy, Noida Sector 51 — hands-on projects, job-ready curriculum
Book a Free Demo →