Bird
Raised Fist0
Tableaubi_tool~10 mins

Measure filters in Tableau - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a filter that only shows sales greater than 1000.

Tableau
IF SUM([Sales]) [1] 1000 THEN 'Show' ELSE 'Hide' END
Drag options to blanks, or click blank then click option'
A<
B=
C>
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' will filter sales less than 1000.
Using '=' will only show sales exactly equal to 1000.
2fill in blank
medium

Complete the code to filter average profit less than 500.

Tableau
IF AVG([Profit]) [1] 500 THEN 'Keep' ELSE 'Remove' END
Drag options to blanks, or click blank then click option'
A<=
B<
C>=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' will include profits greater than or equal to 500.
Using '>' will filter profits above 500, which is opposite.
3fill in blank
hard

Fix the error in the filter to show only records where total quantity equals 200.

Tableau
IF SUM([Quantity]) [1] 200 THEN 'Valid' ELSE 'Invalid' END
Drag options to blanks, or click blank then click option'
A=
B<
C>
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' means not equal, which is incorrect here.
Using '>' or '<' will filter quantities greater or less than 200, not equal.
4fill in blank
hard

Fill both blanks to filter records where average discount is between 5% and 20%.

Tableau
IF AVG([Discount]) [1] 0.05 AND AVG([Discount]) [2] 0.20 THEN 'In Range' ELSE 'Out of Range' END
Drag options to blanks, or click blank then click option'
A>=
B<
C<=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<=' for the upper bound includes 20%, which may not be intended.
Using '>' for the lower bound excludes 5% exactly.
5fill in blank
hard

Fill all three blanks to filter sales where total sales are greater than 1000, profit is at least 200, and quantity is less than 50.

Tableau
IF SUM([Sales]) [1] 1000 AND SUM([Profit]) [2] 200 AND SUM([Quantity]) [3] 50 THEN 'Selected' ELSE 'Not Selected' END
Drag options to blanks, or click blank then click option'
A>
B>=
C<
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' for sales includes 1000, which is not correct here.
Using '<=' for quantity includes 50, which is not intended.

Practice

(1/5)
1. What is the main purpose of a measure filter in Tableau?
easy
A. To filter data based on numeric values in measures
B. To change the color of a chart
C. To add labels to dimensions
D. To create new calculated fields

Solution

  1. Step 1: Understand what measure filters do

    Measure filters focus on numeric data, allowing you to filter based on values like sales or profit.
  2. Step 2: Compare with other options

    Changing colors, adding labels, or creating fields are different Tableau features unrelated to filtering measures.
  3. Final Answer:

    To filter data based on numeric values in measures -> Option A
  4. Quick Check:

    Measure filters = numeric value filtering [OK]
Hint: Measure filters always work on numbers, not text [OK]
Common Mistakes:
  • Confusing measure filters with dimension filters
  • Thinking measure filters change visuals only
  • Believing measure filters create new data
2. Which of the following is the correct way to apply a measure filter in Tableau?
easy
A. Drag a dimension to the Filters shelf
B. Right-click a worksheet and select 'Add Filter'
C. Double-click a measure in the Data pane
D. Drag a measure to the Filters shelf

Solution

  1. Step 1: Identify how to apply measure filters

    Measure filters are applied by dragging a measure (numeric field) to the Filters shelf.
  2. Step 2: Eliminate incorrect options

    Dragging a dimension filters categories, not measures; right-clicking worksheet doesn't add filters; double-clicking measure adds it to view, not filter.
  3. Final Answer:

    Drag a measure to the Filters shelf -> Option D
  4. Quick Check:

    Measure filter = drag measure to Filters [OK]
Hint: Only measures go to Filters shelf for measure filtering [OK]
Common Mistakes:
  • Dragging dimensions instead of measures to Filters
  • Trying to add filters from worksheet menu
  • Double-clicking measures expecting filter dialog
3. Given a sales measure filter set to show only sales greater than 1000, what will happen to a product with sales of 900?
medium
A. It will be excluded from the view
B. It will cause an error
C. It will show as zero sales
D. It will be included in the view

Solution

  1. Step 1: Understand the filter condition

    The filter shows only sales > 1000, so any sales less or equal to 1000 are excluded.
  2. Step 2: Apply condition to product sales

    Product with sales 900 is less than 1000, so it will be excluded from the view.
  3. Final Answer:

    It will be excluded from the view -> Option A
  4. Quick Check:

    Sales 900 < 1000 -> excluded [OK]
Hint: Filters exclude data not meeting condition, no errors [OK]
Common Mistakes:
  • Thinking filtered-out data shows as zero
  • Assuming filter includes all data
  • Expecting error on excluded data
4. You applied a measure filter on Profit > 0 but still see negative profit values in your view. What is the likely cause?
medium
A. The filter condition was set incorrectly as Profit < 0
B. The filter was applied on a dimension instead of the Profit measure
C. The data source has errors causing wrong values
D. The filter is applied after aggregation, so negative values remain

Solution

  1. Step 1: Check filter application

    If the filter was applied on a dimension, it won't filter numeric Profit values correctly.
  2. Step 2: Understand why negative profits appear

    Applying filter on dimension does not remove negative profits; measure filter on Profit is needed.
  3. Final Answer:

    The filter was applied on a dimension instead of the Profit measure -> Option B
  4. Quick Check:

    Filter on dimension ≠ filter on measure [OK]
Hint: Always apply measure filters on measures, not dimensions [OK]
Common Mistakes:
  • Applying measure filter on dimension field
  • Setting wrong filter condition
  • Assuming data source errors cause filter issues
5. You want to create a dashboard showing only customers with total sales above 5000. Which approach using measure filters is best?
hard
A. Apply a measure filter on individual sales transactions > 5000
B. Use a dimension filter on customer names containing '5'
C. Create a calculated field for total sales per customer and filter > 5000
D. Filter the data source to exclude sales below 5000

Solution

  1. Step 1: Understand the requirement

    We want customers with total sales above 5000, so aggregation per customer is needed.
  2. Step 2: Choose correct filtering method

    Applying filter on individual transactions won't sum sales; dimension filter on names is unrelated; filtering data source excludes data prematurely.
  3. Step 3: Use calculated field and filter

    Create a calculated field summing sales per customer, then apply measure filter > 5000 to show only those customers.
  4. Final Answer:

    Create a calculated field for total sales per customer and filter > 5000 -> Option C
  5. Quick Check:

    Aggregate then filter for totals [OK]
Hint: Aggregate measure per group before filtering totals [OK]
Common Mistakes:
  • Filtering individual transactions instead of totals
  • Using dimension filters unrelated to sales
  • Filtering data source instead of view
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