Sales in the first 10 days of each month with FILTER and DAY

Total the sales made in the first 10 days of every month with CALCULATE, FILTER, VALUES and DAY, and see why a plain boolean filter gets it wrong.

You will learn to

  • Filter dates by a part of the date with DAY
  • Keep the row’s dates with FILTER(VALUES(…))
  • Explain why a boolean filter replaces the row’s dates

How it works

Do customers buy more right after payday? One way to check is to total the sales made in the **first 10 days** of each month. `DAY(date)` returns the day of the month, 1 to 31, so the test is `DAY('Date'[Date]) <= 10`.

Where you put that test matters:

- `CALCULATE([Total Sales], DAY('Date'[Date]) <= 10)` looks neat, but a boolean filter on a column means `FILTER(ALL(column), …)`. It **replaces** the row’s dates, so every month shows the first 10 days of **every** month. - `FILTER(VALUES('Date'[Date]), …)` starts from the dates that are **already visible** in the row and keeps the early ones. In March 2025 that is 1–10 March 2025; in a year row it is the first 10 days of each of its months.

Practice it hands-on with a real data model and a live report that updates as you type.

Month-End Week Sales = CALCULATE([Total Sales], FILTER(VALUES('Date'[Date]), DAY('Date'[Date]) >= 25))