Create quick measures

Completed

Microsoft Power BI Desktop includes a feature named Quick Measures. This feature helps you to quickly perform common, powerful calculations by generating the DAX expression for you.

Many categories of calculations and ways to modify each calculation are available to fit your needs. Moreover, you are able to see the DAX that's generated by the quick measure and use it to jumpstart or expand your DAX knowledge.

In this next example, you'll create another compound measure to calculate profit margin. However, this time, you'll create it as a quick measure.

In the Fields pane, select the Sales table. On the Table tools contextual ribbon, from inside the Calculations group, select Quick measure.

An image shows the Table Tools contextual ribbon for the Sales table. The Quick Measure command is highlighted.

In the Quick measures window, in the Calculation drop-down list, locate the Mathematical operations group (you might need to scroll down the list) and then select Division.

An image shows the Quick Measures window, and the selection of the Division calculation.

From the Fields list (in the Quick measures window), expand the Sales table and then drag the Profit measure into the Numerator box. Then, drag the Revenue measure into the Denominator box.

An image shows the Quick Measures window, and configuration of the measure: Numerator is set to Profit; Denominator is set to Revenue.

Select Add. In the Fields pane, notice the addition of the new compound measure. In the formula bar, review the measure definition.

Profit divided by Revenue = 
DIVIDE([Profit], [Revenue])

Note

After the quick measure has been created, you must apply any changes in the formula bar.

Rename the measure as Profit Margin, and then set the format to a percentage with two decimal places.

Add the Profit Margin measure to the matrix visual.