1. Lighthouse

Level 6 · Column or measure?

The request

From Ashley Morgan, Reporting Analyst

“I've got four requests in my queue for the sales report and I keep second-guessing myself. Only one of them has to be a measure, I think. Which one?”

Your goal

Read Ashley's four requests and pick the one that must be a measure rather than a calculated column.

Which of these four requests must be a measure?

Pick one answer, then check it.

The lesson

Both calculated columns and measures are written in DAX, often with the same functions. What separates them is when they are computed and what they are computed over.

What this practice level is

This is a quiz in a practice tool built for this site; Power BI Desktop runs only on Windows. In Power BI Desktop, Modeling → New column (or Table tools → New column) adds a calculated column to the selected table, and Home → New measure adds a measure. In the Data pane, columns show a column icon and measures a calculator icon.

Calculated columns: one value per row, stored

A calculated column:

  • is evaluated once per row of its table, in row context (the current row’s values);
  • is computed when the data refreshes, and stored in the model like an imported column;
  • ignores slicers: a product’s band is the same on every page;
  • can be used anywhere a column can: on rows, axes, slicers, in relationships and exports.

Good uses: labels, bands and flags (Price Band), date parts (Order Year), values per line (Line Value = order_items[quantity] * order_items[unit_price]).

Measures: one value per cell, on demand

A measure:

  • is evaluated once per cell of a visual, in that cell’s filter context;
  • is computed when the report needs it, every time a slicer or filter changes;
  • is not stored, so it adds almost nothing to the model’s size;
  • returns an aggregate: a total, a count, an average, a ratio.

Good uses: Total Sales, Customers, Average Order Value, Margin %, every KPI.

Two questions that decide

Question Yes →
Does the value belong to one row (one line, one product, one order)? calculated column
Must the value change when the report is filtered? measure

Ratios and averages are the classic trap. “Average order value” sounds like a property, but no single order has one. It is total sales divided by order count over a set of orders, and the set is whatever the slicers say.

When a column and a measure work together

They often do. Line Value as a column, then Total Sales = SUM(order_items[Line Value]) as a measure. The column does the per-row arithmetic once, the measure aggregates it per cell. (DAX can also do both at once with SUMX, which you’ll meet later.)

Common mistakes

  • A “total” column. Total = SUM(order_items[quantity]) as a column puts the grand total on every row.
  • A measure for a label. You can’t put a measure on a slicer or a matrix’s rows.
  • Columns for everything. Each one costs memory and refresh time. Use them for what really belongs to a row.

Pick what may run on this site. You can change this any time from "Cookie settings" at the bottom of every page.