Budget vs actual by category with TREATAS

Apply the Product category filter to an unrelated Budget table with TREATAS so budget and actual sales line up in every row and total.

You will learn to

  • Explain why a column with no relationship ignores report filters
  • Copy filters from one column to another with TREATAS
  • Build a budget measure that totals correctly

How it works

Budget is related to Date, so a Year or Month filter reaches it. But Budget[Category] has **no relationship** to Product, so a Category row in a matrix doesn’t filter the budget: every row would show the full budget.

`TREATAS(table, column)` fixes that without changing the model. It takes the values of a table and applies them as a filter on another column, as if a relationship existed. `VALUES(Product[Category])` is the list of categories the current cell can see; `TREATAS(VALUES(Product[Category]), Budget[Category])` filters Budget to those same categories.

Because it passes a **list**, it works on every row: one category on a category row, two on a Silver filter (Bikes and Clothing have silver products), all three on the total.

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

Stock Value for Categories = CALCULATE(SUM(Inventory[Stock Value]), TREATAS(VALUES(Budget[Category]), Product[Category]))