The Power BI custom column generates a new column based on the existing columns. For example, you can use this to calculate profit or loss, etc. Let's see how to create a custom column in Power BI with an example.
How to create a custom column in Power BI
To demonstrate this custom column, we will use the Internet sales table that we imported in the Connect to SQL data source article.
To add or create a custom column, click the Edit queries option under the Home tongue.
By clicking on the Edit queries The option opens a new window called Power Query Editor.
In this example, we are going to calculate profit using Total Product Sale and Sales Amount.
To add a custom column in the Power BI report, go to Add column Tongue. In this tab, click the Custom Column button, as shown below.
Clicking the Custom column button opens the following window.
We change the name of the column to Profit. Next, we subtract the total product from the sales amount.
Now you can see the new profit column.
Let me rearrange the columns so you can see them side by side.
Hit the Close and apply option in Power BI Home tab to apply these changes.