Microsoft Power BI allows you to create a custom columns (or calculated columns) from existing columns. In this article, we will show you, How to create calculated columns in Power BI with example.
To demonstrate this Power BI calculated columns, we are going to use the SQL Data Source that we created in Connect Power BI to SQL Server article. So, refer the same.
How to Create Calculated Columns in Power BI
In order to create a calculated column in Power BI, please click on the New Column option under the Modeling tab.
Clicking the New Column tab will open the DAX formula bar as we shown below
You can rename this calculated column as per your requirement. Let me rename the column as Profit
For the Power BI Calculated Columns demo purpose, we will select Sales Amount, and Total Product Cost from Fact Internet Sales table. As you can see from the below screenshot, while I was typing, Power BI intellisense is showing the suggestions.
From the below screenshot you can see, we are calculating the Profit by removing Total Product Cost from Sales Amount. Next, by clicking the enter, a new column called profit will be created
Let me add the calculated column that we created earlier to the existing Table. Remember, this is the table that we created in Create Table Report article