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 this Power BI calculated columns, we are going to use the SQL Data Source that we created in Connect to SQL Server article. So, refer to the same.
How to Create Calculated Columns in Power BI
In order to create it, please click on the New Column option under the Modeling tab.
Clicking the New tab opens the Power BI DAX formula bar, as we shown below.
You can rename this as per your requirement. Let me rename the column as Profit
For this Calculated Columns demo purpose, we select Sales Amount and Total Product Cost from Fact Internet Sales table. As you can see from the screenshot below, while I was typing, Power BI IntelliSense is showing the suggestions.
From the screenshot below, you can see, we are calculating the Profit by removing Total Product Cost from Sales Amount. Next, by clicking the enter, a new col called profit created.
Let me add the calculated col that we created earlier to the existing Table. Remember, this is the table that we designed in the Table Report article.