How to Add a Custom Column in Power BI? (2025 Guide)

consultant, office, business, finance, economy, indicators, data, consultant, consultant, consultant, consultant, office, office, business, business, business, finance, finance, economy, data, data, data, data, data

Power BI is one of the most powerful business intelligence tools, and adding a custom column allows users to perform calculations, transform data, and enhance reports dynamically. Whether you need to clean data, create calculated fields, or apply specific logic, custom columns play a crucial role.

In this guide, you will learn how to add a custom column in Power BI step by step, understand its benefits, and explore best practices.


πŸ“Œ What is a Custom Column in Power BI?

A custom column in Power BI is a new column created by applying formulas, calculations, or logic on existing columns. It allows you to modify and enhance your dataset within the Power Query Editor before loading the data into Power BI reports.

Unlike calculated columns, which are created in the Data Model using DAX, custom columns are created using Power Query M Language and provide more flexibility in data transformation.


πŸ”Ή Steps to Add a Custom Column in Power BI

Step 1: Open Power Query Editor

  1. Open your Power BI .pbix file.
  2. Click on Transform Data from the Home tab.
  3. The Power Query Editor window will open.

Step 2: Add a New Custom Column

  1. In Power Query Editor, go to the Add Column tab.
  2. Click on Custom Column.
  3. A new Custom Column Editor window will appear.

Step 3: Write Your Formula

  1. In the New Column Name field, enter a name (e.g., “Total Sales”).
  2. In the Custom Column Formula box, enter your formula.Example: Calculate the Total Sales with a 10% tax rate:MCopyEdit[Total Sales] = [Sales] + ([Sales] * 0.10)
  3. Ensure there are no errors (a green check mark will appear if the formula is valid).
  4. Click OK to create the column.

Step 4: Apply and Load the Data

  1. Click Close & Apply in the top-left corner.
  2. The new column will be available in your Power BI dataset for reporting.

πŸ“Š Common Use Cases for Custom Columns

Here are some real-world applications where custom columns help in Power BI reports:

1️⃣ Profit Calculation

If you have Sales and Cost columns, you can calculate Profit:

2️⃣ Conditional Logic for Discounts

If you want to apply a discount based on sales amount, use an IF condition.

(This gives a 10% discount if sales are above β‚Ή5000, otherwise a 5% discount.)

3️⃣ Date Formatting

Convert a full DateTime column to just the year

4️⃣ Creating Full Name from First and Last Name


πŸ’‘ Best Practices for Custom Columns in Power BI

βœ”οΈ Use meaningful column names – Avoid generic names like “Column1”.
βœ”οΈ Optimize performance – Avoid complex calculations that slow down processing.
βœ”οΈ Use conditional logic wisely – Keep formulas simple and readable.
βœ”οΈ Test before applying – Validate the formula to avoid data errors.
βœ”οΈ Prefer M Language for data transformation – Use Power Query for preprocessing data.


πŸ†š Custom Column vs. Calculated Column

FeatureCustom Column (Power Query)Calculated Column (DAX)
Where CreatedPower Query EditorData Model (DAX)
Language UsedM LanguageDAX (Data Analysis Expressions)
Best ForData cleaning, transformationsReport-level calculations
PerformanceFaster as it modifies the datasetSlower as it processes in real-time

πŸ“Œ When to Use a Custom Column?

βœ… Before loading data – If you need to transform data before using it in Power BI.
βœ… For data formatting – Modifying text, numbers, or dates in a dataset.
βœ… For pre-calculated metrics – Avoiding unnecessary calculations in reports.
βœ… For merging or splitting columns – Creating structured data for visualization.


πŸ”š Conclusion

Adding a custom column in Power BI enhances data transformation, improves data structure, and simplifies report building. By leveraging Power Query M Language, you can efficiently preprocess data before using it in your reports.

Now that you have learned how to add a custom column in Power BI, try implementing it in your projects and explore different transformations.

Telegram Channel Link :

https://t.me/powerbi_sql_analyst

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top