Power BI lesson
Your first measure
The same measure works in a card, by store, or by month. It recalculates for whatever is filtered.
Try this lesson free →Example
A measure is a named formula written in DAX, the formula language of Power BI. This one adds up the Revenue column:
Total Revenue = SUM(Sales[Revenue])Key points
Total Revenue =The measure's name comes first, then an equals sign.
SUM(Sales[Revenue])A function, then the column in brackets. Columns are written Table[Column].
AVERAGE MIN MAXSame shape as SUM: AVERAGE(Sales[Revenue]) gives the typical sale.
Every measure in this level has the same shape: Name = FUNCTION(Table[Column]).
In Power BI Desktop
Home, then New measure. Type the formula in the bar at the top and press Enter. The measure appears in the Data pane with a calculator icon.
Practice
1. Build the formula for Total Revenue.
Total Revenue = SUM(Sales[Revenue])2. Build the formula for the biggest single sale.
Biggest Sale = MAX(Sales[Revenue])3. Write a measure for the total quantity sold.
Total Qty = SUM(Sales[Qty])4. Write a measure for the average sale: the average of the Revenue column.
Average Sale = AVERAGE(Sales[Revenue])5. Write a measure for the smallest single sale.
Smallest Sale = MIN(Sales[Revenue])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 →