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

Click Edit Queries button 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.

View Fields in Edit mode 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.

Click the Custom Column 3

Clicking the Custom Column button opens the following window.

Add New column Name 4

We changed the Column name to Profit. Next, we subtract the total product from the sales amount.

Create a New From Existing 5

Now you can see the new column profit

See the column 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