BBampaa

Lessons › Power BI

Power BI lesson

DIVIDE and reusing measures

A measure in square brackets reuses one you've already written. DIVIDE does the division, and if the bottom number is ever zero it shows a blank instead of an error.

Try this lesson free →
About 5–10 minutes · no sign-up needed

Example

You already have [Total Revenue] and [Orders]. Divide one by the other:

Average Order = DIVIDE([Total Revenue], [Orders])

Key points

[Total Revenue]Square brackets, no table name: reuse a measure you've already made.
DIVIDE(top, bottom)Top number first, then a comma, then the bottom number.
Why not / ?DIVIDE handles zero safely. a / b breaks when b is 0.

Put together: DIVIDE([Total Revenue], [Orders]) is revenue per order.

In Power BI Desktop

In the formula bar, type an opening square bracket [ and Power BI lists the measures you've already made.

Practice

Try each one in your head first, then open the answer.

1. Build the formula for Average Order: revenue divided by orders.
Average Order = DIVIDE([Total Revenue], [Orders])
2. Write the Average Order measure: total revenue divided by orders.
Average Order = DIVIDE([Total Revenue], [Orders])
3. Write a measure for revenue per item: total revenue divided by total quantity.
Revenue per Item = DIVIDE([Total Revenue], [Total Qty])
4. Write a measure for items per order: total quantity divided by orders.
Items per Order = DIVIDE([Total Qty], [Orders])

Learn it by doing. This lesson is a short hands-on level on Bampaa: see it work, then build and write it yourself, with instant feedback.

Try this lesson free →
About 5–10 minutes · no sign-up needed