Microsoft Power BI allows you to create custom columns (or calculated columns) from existing columns. In this section, we show you how to create calculated columns in Power BI with example.
To demonstrate these Power BI calculated columns, we will use the SQL data source that we created in the Connect Power BI to SQL Server article. So, refer to the same.
How to create calculated columns in Power BI
To create a calculated column, click the New column option under the Modeling tongue.
By clicking on the New column The tab opens the Power BI DAX formula bar, as shown below.
You can change the name of this calculated column according to your needs. Let me change the column name as Profit
For this purpose of demonstrating Calculated Columns, we select Sales Amount and Total Product Cost from the Fact Internet Sales table. As you can see in the screenshot below, while typing, Power BI IntelliSense displays the suggestions.
In the screenshot below, you can see that we are calculating the profit by removing the total cost of the product from the sales amount. Then clicking Enter creates a new column called Profit.
Let me add the calculated column we created earlier to the existing Table. Remember, this is the table we created in the Create Table Report article.