Budget attainment % that hides where there is no budget

The budget is set by category, not by product. Show attainment on category rows and totals, and blank it on product rows with ISINSCOPE.

You will learn to

  • Recognize when a measure is shown below its data’s grain
  • Blank a measure on detail rows with ISINSCOPE
  • Calculate budget attainment as a percentage

How it works

Every table has a **grain**: the level of detail of one row. Sales are recorded per product; the Budget is set per **category** per month.

Put `[Total Budget]` in a matrix with products under each category and something odd happens: each product row shows its **whole category’s** budget, because TREATAS passes the product’s category to Budget. Divide a single product’s sales by that and the result looks like a failure.

The honest answer is to show nothing below the budget’s grain. Wrap the calculation in `IF(NOT ISINSCOPE(Product[Product]), …)`: category rows and the grand total show the percentage, product rows stay blank.

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

Budget per Month = IF(NOT ISINSCOPE('Date'[Date]), DIVIDE([Total Budget], DISTINCTCOUNT('Date'[YearMonth])))