Create a Custom Column in Power BI

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 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.

Create a Custom Column in Power BI 1

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.

Create a Custom Column in Power BI 2

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.

Create a Custom Column in Power BI 3

Clicking the Custom Column button opens the following window.

Create a Custom Column in Power BI 4

We changed the Column name as Profit. Next, we are subtracting the total product from the sales amount.

Create a Custom Column in Power BI 5

Now you can see the new column profit

Create a Custom Column in Power BI 6

Let me rearrange columns so that you can see them side-by-side

Create a Custom Column in Power BI 7

Hit the Close & Apply option under the Power BI Home tab to apply these changes.

Create a Custom Column in Power BI 8