Bird
Raised Fist0
Tableaubi_tool~20 mins

Aggregate vs row-level calculations in Tableau - Practice Questions

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
๐ŸŽ–๏ธ
Master of Aggregate vs Row-Level Calculations
Get all challenges correct to earn this badge!
Test your skills under time pressure!
๐Ÿง  Conceptual
intermediate
1:30remaining
Understanding Aggregate vs Row-Level Calculations

In Tableau, what is the main difference between aggregate calculations and row-level calculations?

AAggregate calculations summarize data after grouping, while row-level calculations operate on each individual row before aggregation.
BRow-level calculations summarize data after grouping, while aggregate calculations operate on each individual row before aggregation.
CAggregate calculations and row-level calculations both operate on individual rows but differ in syntax only.
DRow-level calculations are only used for filtering data, while aggregate calculations are used for creating new columns.
Attempts:
2 left
๐Ÿ’ก Hint

Think about when the calculation happens: before or after grouping data.

โ“ dax_lod_result
intermediate
1:30remaining
Result of Aggregate vs Row-Level Calculation in Tableau

Given a sales dataset with columns Region and Sales, which Tableau calculation will return the total sales per region?

Choose the correct formula:

AIF [Sales] > 100 THEN [Sales] ELSE 0 END
BSUM([Sales])
CAVG([Sales])
D[Sales] * 2
Attempts:
2 left
๐Ÿ’ก Hint

Think about which function aggregates sales per group.

โ“ visualization
advanced
2:00remaining
Choosing the Right Calculation Type for a Dashboard

You want to create a dashboard showing average sales per customer and also highlight customers with sales above average. Which calculation types should you use?

AUse only aggregate calculations for both tasks.
BUse row-level calculation for average sales per customer and aggregate calculation to flag customers above average.
CUse only row-level calculations for both tasks.
DUse aggregate calculation for average sales per customer and row-level calculation to flag customers above average.
Attempts:
2 left
๐Ÿ’ก Hint

Average sales per customer is a summary, flagging is per row.

๐Ÿ”ง Formula Fix
advanced
1:30remaining
Debugging a Calculation Mixing Aggregate and Row-Level Functions

Consider this Tableau calculated field: [Sales] / AVG([Sales]). What issue will this cause?

AIt will return the total sales divided by the average sales for the entire dataset.
BIt will calculate the ratio correctly for each row without issues.
CIt will cause an error because you cannot mix row-level and aggregate calculations directly.
DIt will ignore the AVG function and treat both as row-level.
Attempts:
2 left
๐Ÿ’ก Hint

Think about how Tableau handles mixing aggregation levels in one formula.

๐ŸŽฏ Scenario
expert
2:30remaining
Scenario: Optimizing Performance with Calculation Types

You have a large dataset and need to calculate the percentage contribution of each product's sales to the total sales. Which approach is best for performance and accuracy?

AUse an aggregate calculation to sum sales per product and then divide by the total sales calculated as a separate aggregate in Tableau.
BCalculate percentage contribution using only row-level calculations without aggregation.
CUse a row-level calculation to divide each product's sales by the total sales aggregated once at the data source level.
DCalculate total sales per product using row-level calculations and total sales using aggregate calculations in the same formula.
Attempts:
2 left
๐Ÿ’ก Hint

Consider where aggregation happens and how to avoid repeated calculations.

Practice

(1/5)
1. Which statement best describes the difference between aggregate and row-level calculations in Tableau?
easy
A. Row-level calculations are only used for filtering data, aggregate calculations are for calculations.
B. Aggregate calculations work on each individual record, while row-level calculations summarize data.
C. Both aggregate and row-level calculations always summarize data across multiple records.
D. Row-level calculations operate on each individual data record, while aggregate calculations summarize multiple records.

Solution

  1. Step 1: Understand row-level calculations

    Row-level calculations are applied to each individual row or record in the data source.
  2. Step 2: Understand aggregate calculations

    Aggregate calculations combine or summarize multiple rows into a single value, like sum or average.
  3. Final Answer:

    Row-level calculations operate on each individual data record, while aggregate calculations summarize multiple records. -> Option D
  4. Quick Check:

    Row-level = individual rows, Aggregate = summary [OK]
Hint: Remember: row-level = each row, aggregate = summary [OK]
Common Mistakes:
  • Confusing which calculation works on individual rows
  • Thinking aggregate works on single records
  • Mixing filtering with calculation types
2. Which of the following is the correct syntax for a row-level calculation in Tableau?
easy
A. [Sales] * 1.1
B. SUM([Sales])
C. AVG([Profit])
D. COUNTD([Customer ID])

Solution

  1. Step 1: Identify row-level calculation syntax

    Row-level calculations use fields directly without aggregation functions, e.g., multiplying a field by a number.
  2. Step 2: Identify aggregate calculation syntax

    Functions like SUM(), AVG(), COUNTD() are aggregate calculations summarizing data.
  3. Final Answer:

    [Sales] * 1.1 -> Option A
  4. Quick Check:

    Row-level uses direct field references without aggregation [OK]
Hint: Row-level calculations use fields directly, no SUM or AVG [OK]
Common Mistakes:
  • Using aggregation functions for row-level calculations
  • Confusing SUM() as row-level
  • Not recognizing direct field references
3. Given a dataset with sales records, what will the Tableau calculation SUM([Sales]) / COUNT([Order ID]) return?
medium
A. The average sales per order (aggregate calculation).
B. The total sales multiplied by the number of orders (row-level calculation).
C. The sales value for each individual order (row-level calculation).
D. The count of unique sales values (aggregate calculation).

Solution

  1. Step 1: Analyze the calculation components

    SUM([Sales]) adds all sales values; COUNT([Order ID]) counts all orders.
  2. Step 2: Understand the division result

    Dividing total sales by number of orders gives average sales per order, an aggregate summary.
  3. Final Answer:

    The average sales per order (aggregate calculation). -> Option A
  4. Quick Check:

    SUM/COUNT = average per order [OK]
Hint: SUM divided by COUNT usually means average [OK]
Common Mistakes:
  • Thinking the result is row-level instead of aggregate
  • Confusing COUNT with COUNTD (unique count)
  • Assuming multiplication instead of division
4. You wrote the calculation SUM([Sales] * [Quantity]) in Tableau but it gives an error. What is the likely problem?
medium
A. SUM() cannot be used with numeric fields.
B. You cannot multiply fields inside an aggregate function; multiply first, then aggregate.
C. You must use AVG() instead of SUM() for multiplication.
D. The calculation should be SUM([Sales]) * SUM([Quantity]) to work.

Solution

  1. Step 1: Understand calculation order in Tableau

    Tableau requires row-level operations before aggregation; multiplying fields inside SUM() is invalid.
  2. Step 2: Correct approach for multiplication then aggregation

    Multiply [Sales] by [Quantity] at row-level, then aggregate the result with SUM.
  3. Final Answer:

    You cannot multiply fields inside an aggregate function; multiply first, then aggregate. -> Option B
  4. Quick Check:

    Row-level calc inside aggregate must be done outside first [OK]
Hint: Multiply fields first, then aggregate with SUM [OK]
Common Mistakes:
  • Trying to multiply inside SUM() directly
  • Using SUM() on non-numeric fields
  • Replacing SUM() with AVG() incorrectly
5. You want to calculate the average profit per customer in Tableau. Which calculation correctly combines row-level and aggregate calculations?
hard
A. SUM([Profit] / COUNTD([Customer ID]))
B. AVG(SUM([Profit]))
C. SUM([Profit]) / COUNTD([Customer ID])
D. SUM([Profit]) * COUNTD([Customer ID])

Solution

  1. Step 1: Understand the goal

    We want average profit per customer, so total profit divided by unique customers.
  2. Step 2: Analyze each option

    SUM([Profit]) / COUNTD([Customer ID]) divides total profit (SUM) by distinct customer count (COUNTD), correctly calculating average profit per customer.
  3. Final Answer:

    SUM([Profit]) / COUNTD([Customer ID]) -> Option C
  4. Quick Check:

    Total profit รท unique customers = average profit per customer [OK]
Hint: Divide total profit by distinct customers for average [OK]
Common Mistakes:
  • Using AVG(SUM()) which is invalid syntax
  • Dividing inside SUM() instead of outside
  • Multiplying instead of dividing