Write DAX measures against a real table and have them evaluated. A simulation, not Power BI, but the same thinking.
THE TABLE
One Table Called Sales
Twelve rows, six columns. In DAX you refer to a column as Sales[Value], with the table name first and the column in square brackets.
Date
Region
Product
Units
Value
Refund
2026-03-02
North
Pro plan
2
480
0
2026-03-03
South
Starter
1
60
0
2026-03-05
North
Add-on
3
135
45
2026-03-08
East
Pro plan
1
240
0
2026-03-11
South
Pro plan
2
480
240
2026-03-14
North
Starter
1
60
0
2026-03-18
West
Add-on
4
180
0
2026-03-21
East
Pro plan
2
480
0
2026-03-24
South
Add-on
1
45
45
2026-03-27
West
Pro plan
1
240
0
2026-03-29
North
Pro plan
2
480
0
2026-03-30
East
Starter
1
60
60
This is a simulation, clearly labelled. It runs a teaching subset of DAX in your browser: SUM, COUNTROWS, AVERAGE, MIN, MAX, DIVIDE, CALCULATE and FILTER, plus arithmetic. It is not Power BI, but the thinking transfers directly.
SIX EXERCISES
Write, Evaluate, Check
Each exercise teaches the function first. Unlimited attempts, a hint whenever you want one, and the worked answer after three tries.
0 of 6 exercises solved
1
Exercise 1 of 6
Add up a column
Not attempted
First, the function: SUM
A measure is a calculation that runs over whatever the report is filtered to. SUM adds one column of a table, written as Table[Column].
The pattern
Total Revenue = SUM(Sales[Value])
Your task
Write a measure that totals the Value column.
=
Hint
SUM takes one column, written Sales[Value].
What this tells you: A measure has no fixed answer. It recalculates for every row, filter and slicer on the page.
2
Exercise 2 of 6
Count the rows
Not attempted
First, the function: COUNTROWS
COUNTROWS counts rows rather than values, which is what you want when you are counting orders rather than adding money.
The pattern
Orders = COUNTROWS(Sales)
Your task
Write a measure that counts how many orders there are.
=
Hint
COUNTROWS takes the table itself, not a column.
What this tells you: Counting rows and summing a column answer different questions. Name the measure so nobody confuses them.
3
Exercise 3 of 6
Divide safely
Not attempted
First, the function: DIVIDE
DIVIDE is the safe division. If the bottom is zero it returns blank rather than an error, which keeps a dashboard from breaking on a quiet day.
The pattern
Avg Order Value = DIVIDE(SUM(Sales[Value]), COUNTROWS(Sales))
Your task
Write a measure for average order value: total value divided by the number of orders.
=
Hint
Put SUM on top and COUNTROWS underneath, inside DIVIDE.
What this tells you: Never use a slash for division in a measure. DIVIDE handles the zero case for you.
4
Exercise 4 of 6
Change the filter
Not attempted
First, the function: CALCULATE
CALCULATE is the one that matters. It runs a calculation with the filters you give it, replacing whatever the report had for that column.
The pattern
North Revenue = CALCULATE(SUM(Sales[Value]), Sales[Region]="North")
Your task
Write a measure for revenue in the North region only.
=
Hint
CALCULATE takes the calculation first, then the filter: Sales[Region]="North".
What this tells you: CALCULATE replaces the filter on that column. It does not add to it, which surprises people the first time.
5
Exercise 5 of 6
Filter a table
Not attempted
First, the function: FILTER
FILTER returns a table of rows that pass a test, and is used inside CALCULATE when the condition is more than a simple equals.
The pattern
Big Orders = CALCULATE(SUM(Sales[Value]), FILTER(Sales, Sales[Value] > 200))
Your task
Write a measure that totals only the orders worth more than 200.
=
Hint
FILTER takes the table, then the test. Wrap it in CALCULATE.
What this tells you: Use a simple filter where you can, and FILTER only when the test needs a comparison.
6
Exercise 6 of 6
Net it off
Not attempted
First, the function: Combining measures
Measures are built from other measures. Writing one big expression is harder to read and harder to fix than two small ones.
The pattern
Net Revenue = SUM(Sales[Value]) - SUM(Sales[Refund])
Your task
Write a measure for net revenue: total value less total refunds.
=
Hint
Two SUMs with a minus between them.
What this tells you: Net revenue is £2,550 against £2,940 gross. Refunds are 13% of the month, which the gross figure hides completely.
Build Your Confidence with Data
Every skill path on Insyt is built around practice like this.