Mission M16 · DAX · 15 min

Your first measure: Total Net Sales

Request from your manager

The CFO opens your model and asks: "What is our total net sales after discounts for the two years? I don't want gross numbers." There is no net sales column in order_items, so you will calculate it row by row.

Data

Download the practice file(s):

Steps

  1. Open the model from the previous mission (order_items related to orders, products, stores).
  2. Select the order_items table and click New measure.
  3. Use SUMX to iterate order_items and compute quantity * unit_price * (1 - discount) for each line.
  4. Format the measure as Currency with 2 decimals.
  5. Show it in a Card visual with no filters applied and read the total.

Check your answer

What is Total Net Sales for 2024–2025, in dollars?

Show solution

SUMX evaluates the expression on every one of the 28,742 order lines and adds the results: $247,643.60.

Total Net Sales =
SUMX (
    order_items,
    order_items[quantity] * order_items[unit_price] * ( 1 - order_items[discount] )
)

Answer: 247643.6 $