Quick Measures Preview

Quick measures, a new feature we released in our April Power BI Desktop update, lets you quickly create new measures based on measures and numerical columns in your table. These new measures become part of your model and can be used in any of your charts, just like manually created DAX calculations. You can also see the underlying DAX, and edit it if you need to tweak the results.

You can create measures based on 19 different calculations across five different categories. Let’s take a look at those five different categories.

Aggregate within category

These calculations let you apply different aggregates at different levels in your data. For example, you can sum revenue up to the month level, and then take an average of that total to display at the year level.

The result would look something like this:

The calculations included in the Aggregate category are:

Average within category

Variance within category

Max within category

Min within category

Filters and baselines

This category of calculations lets you calculate values for a specific category in a column, or compare values to a specific baseline. For example, the following quick measure calculates the SalesAmount for just Deluxe Class products:

A card is a good way to display these filtered measures:

The calculations included in this category of quick measures are:

Filtered measure

Difference from baseline

Percentage difference from baseline

Time intelligence

If you need a measure that shows period-to-date or period-over-period values, the time intelligence category of calculations lets you do this.

For example, you can calculate the sales amount over the order year to date.

Here’s the result of that calculation alongside the unaggregated value:

The included calculations are:

Year-to-date total

Quarter-to-date total

Month-to-date total

Year over year change

Quarter over quarter change

Month-over-month change

At present, the time intelligence calculations only work with date fields with Power BI’s built-in date hierarchies. If you’re using your date field in visuals and see Date Hierarchy on the field well menu, then you can use that field in the time intelligence quick measures.

We’re looking to remove that date hierarchy restriction in the future, so you can easily use your own date tables too.

Running total

This category (it’s just one calculation, so far) is similar to the YTD calculation, but lets you apply a running total over any field, not just dates.

Here’s an example adding up the sales amount over each product class:

Mathematical operations

These calculations run simple mathematical functions, which can become powerful when chained together.

Here’s an example showing a few chained together to produce line item total values.

The included calculations are:

Addition

Subtraction

Multiplication

Division

Percent difference

You can create a quick measure by selecting Quick measures from the field menu, either in the field well of a chart or from the field list.

In the dialog, you can choose which of the 19 different calculations you want to perform on your selected measure. Depending on the calculation, you’ll see different parameters you’ll be required to fill in. You can also change which fields are being used in the calculation by using the field list on the right half of the dialog.

After you provide the required parameters and click OK, the quick measure is now part of your model and available to use in your other visuals. If you had originally launched the quick measures dialog from the field well of a visual, the new measure is added to the visual.

In addition, just like any other measure, you can see the DAX formula that Power BI used to create this new measure. This is a great way to learn more about DAX.

Preview Feedback

Of course, since this is a preview feature we need your feedback! We’d like to know how well these quick measures meet your business needs, whether they produce the results you expect, and whether it’s easy to create them. Try out the calculations, create a few in your models, and then please fill out this survey.

We’re also looking for help creating more measures to share with everyone. If you have common calculations that would be helpful for the rest of the community, you can submit them using the following template. We’ll evaluate the DAX statement and may use it as the basis of a future quick measure.

Template

To see what your submission should look like, let’s take the Average per category quick measure as an example.

This is how the dialog looks when configuring the calculation:

And here’s how it would look in the template that you submit:

Name:

Average per category

Description:

Calculate the average of the base value within the category

Parameters:

Name: Base value

Tooltip: The value you want to average

Type: Numerical field / measure

Name: Category

Tooltip: The category in which you want to calculate the average

Type: Categorical field

DAX:

Average {Base value} per {Category} =

AVERAGEX(

KEEPFILTERS(VALUES({Category})),

CALCULATE({Base value})

)

The valid ‘types’ for the parameters are:

Numeric field / measure

These are aggregates that you might use in your calculation, for example {Base value} used above.

Categorical field

These are fields, typically text, used as categories in your measure, for example {Category} used above.

Instance value

These parameters are specific values from a field. The ‘Filtered value’ quick measure uses this in the ‘Filter’ parameter.

Date field

For time intelligence type measures, this specifies a date field is needed.

Integers

Whole numbers that might be used as parameters in DAX functions

So get writing! The most useful measures will be generic and applicable to many different businesses and scenarios. You can submit your ideas for quick measures using this template on our community forum. While we can’t guarantee that we’ll use them in the product, and we may have to edit the DAX, we will review all the submissions and prioritize those that get the most votes on the forum. Thank you!