Mission M20 · DAX · 20 min

CALCULATE with filters: online beverages

Request from your manager

The e-commerce manager is negotiating with a beverage supplier: "How much did we sell in Beverages through the Online channel in 2025? I need that number on a card that ignores whatever the user clicks."

Data

Download the practice file(s):

Steps

  1. Start from [Total Net Sales] and the 'Date' table.
  2. Create a measure with CALCULATE and three filter arguments: products[category], orders[channel] and 'Date'[Year].
  3. Remember: each filter argument replaces any existing filter on that same column.
  4. Show the measure in a Card.
  5. Check it: build a table filtered to Beverages + Online + 2025 using the regular [Total Net Sales] and compare.

Check your answer

What were 2025 Online net sales for the Beverages category?

Show solution

CALCULATE applies the three filters together (AND) before evaluating [Total Net Sales]: $5,513.52.

Online Beverages 2025 =
CALCULATE (
    [Total Net Sales],
    products[category] = "Beverages",
    orders[channel] = "Online",
    'Date'[Year] = 2025
)

Answer: 5513.52 $