Power BI Custom column generates a new column based on the existing columns. For example, you can use this to calculate the profit or loss, etc. Let us see how to create a custom column in Power BI with an example.
How to create custom column in Power BI
To demonstrate this Power BI custom Column, we are going to use the Internet Sales table that we imported in Connect to SQL Data Source article.
To add or create a custom column, please click the Edit Queries option under the Home tab.
Clicking the Edit Queries option opens a new window called Power Query Editor.
In this example, we are going to calculate the profit using the Total Product Sale and the Sales Amount.
To add a custom column in the Power BI report, go to Add Column Tab. Under this tab, please click on the Custom Column button, as shown below.
Clicking the Custom Column button opens the following window.
We changed the Column name as Profit. Next, we are subtracting the total product from the sales amount.
Now you can see the new column profit
Let me rearrange columns so that you can see them side-by-side
Hit the Close & Apply option under the Home tab to apply these changes.