Create Calculated Columns in Power BI

Microsoft Power BI allows you to create custom or calculated columns from existing ones. In this section, we show you how to create calculated columns with examples.

To demonstrate these calculated columns, we will use the SQL Data Source that we created in Connect to SQL Server article. So, refer to the same.

Sample Table

How to Create Calculated Columns in Power BI

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

Go to Modeling Tab

Clicking the New tab opens the Power BI DAX formula bar, as shown below.

Create Calculated Columns in Power BI 3

You can rename this as per your requirement. Let me rename the column as Profit.

Place to write query 4

For this Calculated Columns demo purpose, we select Sales Amount and Total Product Cost from the Fact Internet Sales table. As you can see from the screenshot below, Power BI IntelliSense is showing the suggestions while I was typing.

Write DAX Query 5

From the screenshot below, you can see that we are calculating the Profit by removing the Total Product Cost from Sales Amount. Next, a new col called profit is created by clicking the enter.

Complete DAX Expression 6

Let me add the calculated col we created earlier to the table. Remember, this is the table that we designed in the Table Report article.

Create Calculated Columns in Power BI 7