In Microsoft Power BI, you can create a custom calculated measure (or numeric aggregated calculation) from existing columns. In this article, we will show you, How to create calculated measures in Power BI with example.
To demonstrate this Power BI calculated measures, we are going to use the Data Source that we created in Connect Power BI to SQL Server article.
How to Create Calculated Measures in Power BI
In order to create a calculated measure, please click on the New Measure option under the Modeling tab.
Clicking the New Measure tab will open the DAX formula bar with default measures name as we shown below
You can rename this calculated measure as per your requirement. Let me rename the measure as Total Sale
For the demo purpose, we will 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 a measure.
As you can see from the below screenshot, while I was typing, Power BI intellisense is showing the suggestions.
By clicking the enter or any key, a new Measure called TotalSale will be created
Let me add the calculated Measure that we created earlier to a Table. Please refer Create Table Report article to understand the steps involved in creating a table
Let me minimize the Fields tab, and Visualization. So that you can focus on table values.
You can also apply filters on this calculated measures too. From the below screenshot you can see that, we selected few areas in our Pie Chart, and the same has been reflected in the table as well.