Bird
Raised Fist0
Tableaubi_tool~20 mins

Line charts in Tableau - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Line Chart Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ visualization
intermediate
2:00remaining
Identify the correct use of a dual-axis line chart

You have two measures: Sales and Profit Margin. You want to show their trends over time on the same line chart but with different scales. Which option correctly describes how to create this visualization in Tableau?

APlace both measures on Columns shelf and use the 'Show Me' panel to select a line chart.
BPlace both measures on Rows shelf, right-click the second axis and select 'Dual Axis', then synchronize axes.
CCreate two separate worksheets and place them side by side on a dashboard.
DCombine both measures into one calculated field and plot it on a single axis.
Attempts:
2 left
💡 Hint

Think about how Tableau allows overlaying two measures with different scales.

❓ dax_lod_result
intermediate
2:00remaining
Calculate running total for sales over months

Given a sales table with columns Month and SalesAmount, which DAX measure correctly calculates the running total of sales by month?

ARunning Total = CALCULATE(SUM(Sales[SalesAmount]), FILTER(ALL(Sales[Month]), Sales[Month] <= MAX(Sales[Month])))
BRunning Total = SUMX(FILTER(Sales, Sales[Month] >= MIN(Sales[Month])), Sales[SalesAmount])
CRunning Total = SUM(Sales[SalesAmount])
DRunning Total = CALCULATE(SUM(Sales[SalesAmount]), FILTER(Sales, Sales[Month] >= MAX(Sales[Month])))
Attempts:
2 left
💡 Hint

Consider how to accumulate sales up to the current month.

❓ data_modeling
advanced
2:30remaining
Optimizing data model for time series line charts

You want to create a line chart showing monthly sales trends for multiple product categories. Your current data model has a large sales fact table and a separate date dimension table. What is the best modeling practice to optimize performance and accuracy for this line chart?

ARemove the date dimension table and use only the date column in the sales fact table.
BDuplicate the sales fact table and join it with the date table on the month name text field.
CEnsure the date dimension table is marked as a Date Table and create a relationship with the sales fact table on the date key.
DCreate a calculated column in the sales table to convert dates to text and use it for filtering.
Attempts:
2 left
💡 Hint

Think about how date tables improve time intelligence calculations.

🔧 Formula Fix
advanced
2:30remaining
Fix the issue with missing data points in a line chart

You created a line chart showing monthly sales, but some months are missing from the line, causing breaks. What is the most likely cause and fix?

AThe date dimension table is missing some months; add all months to the date table to fix it.
BThe sales data has null values; replace nulls with zeros in the sales column.
CThe line chart is filtered by product category; remove the filter to show all months.
DThe axis is set to categorical; change it to continuous to show all months.
Attempts:
2 left
💡 Hint

Consider how Tableau or BI tools treat date axes in line charts.

🎯 Scenario
expert
3:00remaining
Designing a dynamic line chart with user-selected measures

You want to build a line chart dashboard where users can select which measure to display (e.g., Sales, Profit, Quantity). Which approach best supports this dynamic selection in Tableau?

ACreate a parameter listing all measures and use a calculated field with CASE to switch measures based on the parameter value.
BCreate separate worksheets for each measure and use dashboard actions to show/hide them based on user clicks.
CUse a filter on the measure field to let users select the measure to display.
DCreate a calculated field that sums all measures and plot it as a single line.
Attempts:
2 left
💡 Hint

Think about how parameters and calculated fields can create dynamic visuals.

Practice

(1/5)
1. What is the primary purpose of a line chart in Tableau?
easy
A. To show trends over time or ordered data
B. To display proportions of categories
C. To compare individual values without order
D. To show relationships between two categorical variables

Solution

  1. Step 1: Understand line chart usage

    Line charts are designed to show how data changes over time or ordered sequences.
  2. Step 2: Compare with other chart types

    Other charts like pie or bar charts serve different purposes such as proportions or category comparisons.
  3. Final Answer:

    To show trends over time or ordered data -> Option A
  4. Quick Check:

    Line charts = trends over time [OK]
Hint: Line charts = trends over time or ordered data [OK]
Common Mistakes:
  • Confusing line charts with pie charts
  • Using line charts for categorical comparisons
  • Ignoring the order or time aspect
2. Which of the following is the correct way to create a continuous line chart in Tableau?
easy
A. Drag a continuous date field to Columns and a measure to Rows
B. Drag a measure to Columns and a dimension to Size
C. Drag a dimension to Rows and a measure to Color
D. Drag a discrete date field to Columns and a measure to Rows

Solution

  1. Step 1: Identify continuous date usage

    Continuous date fields create smooth, connected lines in Tableau.
  2. Step 2: Understand discrete vs continuous

    Discrete dates create separate marks; continuous dates create a continuous axis for line charts.
  3. Final Answer:

    Drag a continuous date field to Columns and a measure to Rows -> Option A
  4. Quick Check:

    Continuous date + measure = line chart [OK]
Hint: Use continuous date fields for smooth lines [OK]
Common Mistakes:
  • Using discrete dates for line charts
  • Placing dimensions on Color instead of axis
  • Confusing measure placement
3. Given a dataset with sales over months, what will happen if you drag Order Date (continuous) to Columns and SUM(Sales) to Rows in Tableau?
medium
A. A bar chart with sales for each month
B. A pie chart showing sales proportions
C. A scatter plot of sales vs. months
D. A smooth line chart showing sales trend over months

Solution

  1. Step 1: Analyze continuous date on Columns

    Continuous dates create a continuous axis, ideal for line charts.
  2. Step 2: Analyze SUM(Sales) on Rows

    SUM(Sales) aggregates sales values to plot points connected by lines.
  3. Final Answer:

    A smooth line chart showing sales trend over months -> Option D
  4. Quick Check:

    Continuous date + SUM(Sales) = line chart [OK]
Hint: Continuous date + measure = smooth line chart [OK]
Common Mistakes:
  • Expecting bars instead of lines
  • Confusing continuous with discrete dates
  • Misinterpreting aggregation effect
4. You created a line chart but see disconnected points instead of a line. What is the most likely cause?
medium
A. Using a continuous date field on the Columns shelf
B. Using a discrete date field on the Columns shelf
C. Placing a measure on Color instead of Rows
D. Not aggregating the measure

Solution

  1. Step 1: Identify effect of discrete date

    Discrete dates create separate marks for each date, causing disconnected points.
  2. Step 2: Contrast with continuous date

    Continuous dates create a continuous axis, connecting points with lines.
  3. Final Answer:

    Using a discrete date field on the Columns shelf -> Option B
  4. Quick Check:

    Discrete date = disconnected points [OK]
Hint: Discrete dates cause disconnected points [OK]
Common Mistakes:
  • Assuming continuous dates cause disconnected points
  • Ignoring aggregation importance
  • Misplacing measures on Color
5. You want to compare sales trends for multiple product categories over time in one line chart. Which approach is best in Tableau?
hard
A. Place Category on Columns, continuous Order Date on Rows, and SUM(Sales) on Label
B. Place discrete Order Date on Columns, Category on Rows, and SUM(Sales) on Size
C. Place continuous Order Date on Columns, SUM(Sales) on Rows, and Category on Color
D. Place continuous Order Date on Rows, Category on Color, and SUM(Sales) on Tooltip

Solution

  1. Step 1: Use continuous date for smooth time axis

    Continuous Order Date on Columns creates a smooth timeline axis.
  2. Step 2: Use SUM(Sales) on Rows for measure values

    SUM(Sales) on Rows plots sales values vertically.
  3. Step 3: Use Category on Color to separate lines

    Category on Color differentiates multiple lines by color for easy comparison.
  4. Final Answer:

    Place continuous Order Date on Columns, SUM(Sales) on Rows, and Category on Color -> Option C
  5. Quick Check:

    Continuous date + measure + color by category = multi-line chart [OK]
Hint: Use color to separate lines by category [OK]
Common Mistakes:
  • Using discrete dates causing broken lines
  • Placing category on Rows instead of Color
  • Not using continuous date for time axis
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard