Create Calculated Measures in Power BI

In Microsoft Power BI, you can create a custom calculated measure (or numeric aggregated calculation) from existing columns. This article shows you how to create calculated measures with an example.

To demonstrate these calculated measures, we will use the Data Source we created in Connect to SQL Server article.

Two Pie Charts Report 1

How to Create Calculated Measures in Power BI

In order to create it, please click on the New Measure option under the Modeling tab.

Go to Modeling Tab 2

Clicking the Power BI New tab opens the DAX formula bar with the default measures name, as shown below.

Write DAX Expression 3

You can rename this as per your requirement. Let me rename this one as Total Sale.

Create Calculated Measures in Power BI 4

For the Power BI calculated measures demo purpose, we add the Internet Sales Amount, Reseller Sales Amount from Fact Internet Sales, and Fact Reseller Sales tables. Unlike calculated columns, you have to use the aggregated function to create it.

As you can see from the screenshot below, Power BI IntelliSense was showing the suggestions while I was typing.

Write a DAX Query 5

By clicking the enter or any key, a new Measure called TotalSale will create.

Create Calculated Measures in Power BI 6

Let me add the calculated Measure that we created earlier to a Table. Please refer Table Report article to understand the steps involved in creating a table.

Add to a Table 7

Let me minimize the Fields tab and Visualization so you can focus on table values.

Create Calculated Measures in Power BI 8

You can also apply filters on these too. From the screenshot below, you can see that we selected a few areas in our Pie Chart, and the same has also been reflected in the table.

Apply Filters 9