
In this blog, you will learn how to create a custom column in Power Query in Power BI Desktop. Please note that this blog is written based on a common request about the Custom Column in Power Query. For detailed learning, you must enrol for Power Query.
What is a custom column?
A custom column helps you to create new data or columns from the existing columns by writing formulas in Power Query’s M language. To define the logic of creating a new column, you can use operators like +, -, *, /, and &, and you can also use functions.
For example, you can calculate profit using the formula Sales – Cost.
Steps to Add a Custom Column
Step 1: Load Data into Power Query
- Open Power BI Desktop latest version.
- On the Home tab, click the Get Data option and choose your data source (Excel, SQL Server, CSV, etc.).
- After importing the data, right-click on the table name & click on “Edit Query” to launch Power Query Editor.
Step 2: Open the Add Column Tab
- In the Power Query Editor application, click on the Add Column tab.
- Click on the Custom Column option.
Step 3: How to Create a Custom Column in Power Query
A dialogue box with the name “Add Custom Column” will appear.
- Enter the name of the new column
- In the formula space, write the required formula like [Sales] – [Cost] to calculate the cost.
- You can double-click field names in the right-side list also to insert them easily.
Step 4: Check for Errors
If there’s an issue with your formula, you’ll see a red error message at the bottom of the dialogue box. Fix it before clicking OK.
Step 5: Review the Result
After clicking OK, Power Query adds your new custom column to the data preview pane.
You can scroll right to see the new column and verify the results.
Step 6: Load Data Back to Power BI Desktop
Once satisfied:
- Click Home → Close & Apply
- It will load the updated columns in the frontend or Power BI.
Examples of creating a Custom Column that go beyond the built-in GUI features
Finding out the dynamic fiscal year start based on the month
if Date.Month([Order Date]) >= 4 then Date.Year([Order Date]) else Date.Year([Order Date]) – 1
So, this way, you can add the custom columns using functions. Sometimes, you can fulfil your custom column requirements using the Power Query interface also but using formulas you can do it single step while using interface you have to do the same task with multiple steps. Now, you might ask what all functions and how many functions we have in Power Query, lets go through the next section.
How many Power Query functions do we have?
There are 700+ built-in functions in Power Query M. Please have a look at the category of functions.
| Category | Description | Example Functions |
| Accessing Data | Functions that connect to data sources & return table values. | Excel.Workbook, Web.Contents |
| Binary | Process binary data (encoding, decoding, compressing, etc.). | Binary.FromText, Binary.Buffer |
| Combiner | Merge or combine values/records/lists. | Record.Combine, List.Combine |
| Comparer | Compare values (e.g., for sorting or equality). | Comparer.OrdinalIgnoreCase, Value.Equals |
| Date | Manipulate date values. | Date.AddDays, Date.Year |
| DateTime | Manipulate date-time values. | DateTime.LocalNow, DateTime.From |
| DateTimeZone | Handle date-times with time zones. | DateTimeZone.UtcNow, DateTimeZone.SwitchZone |
| Duration | Work with durations (time intervals). | Duration.TotalDays, Duration.From |
| Error Handling | Manage errors and custom error logic. | Error.Record, Try |
| Expression | Evaluate or compose M expressions dynamically. | Expression.Evaluate, Value.NativeQuery |
| Function Values | Create or manipulate functions themselves. | Function.Invoke, Value.Type |
| List | Create, transform, filter, query lists. | List.Sum, List.FirstN |
| Lines | Convert lists of text to/from binary/text. | Lines.FromBinary, Lines.ToList |
| Logical | Work with Boolean values (true/false). | Logical.And, Logical.Or |
| Number | Arithmetic, rounding, trigonometry, comparisons, etc. | Number.Round, Number.Mod |
| Record | Work with record types (key-value). | Record.Field, Record.AddField |
| Replacer | Replacement operations for values. | Replacer.ReplaceText, Replacer.ReplaceValue |
| Splitter | Split data into parts using criteria. | Splitter.SplitTextByDelimiter |
| Table | Create and shape table values. | Table.AddColumn, Table.Sort |
| Text | Manipulate text strings. | Text.Upper, Text.BeforeDelimiter |
| Time | Work with time values (hours/minutes/seconds). | Time.From, Time.Hour |
| Type | Work with types & type transformations. | Type.Is, Type.TableRow |
| Uri | Create, manipulate, parse URIs (URLs). | Uri.Parts, Uri.BuildQueryString |
| Value | Evaluate or operate on generic values. | Value.Metadata, Value.Type |
We hope we have come up with a clear explanation of the topic. You must enrol Power BI complete pack. You can check the Course Details and Power BI Course Fee here.
1. I’m new to Power Query – where can I learn how to create a “Custom Column in Power Query” step-by-step?
You can start with our Power BI Fundamentals with Power Query course. It covers all core concepts — including data transformation, cleaning, and advanced formula creation – with hands-on examples.
2. Do you offer live or recorded sessions on Power BI and Power Query?
Yes! We offer both live instructor-led batches and self-paced recorded programs. Live classes are interactive, allowing you to practice custom column creation, M language, and real-time use cases with guidance.
3. I already know Power BI visuals – should I still learn Power Query?
Absolutely. Power Query is the data preparation layer of Power BI – mastering it saves time, reduces DAX complexity, and improves report performance. Even advanced BI professionals rely heavily on Power Query transformations.
4. Do you provide practical assignments or datasets to practice these formulas?
Yes, every module includes practice datasets and assignments – including exercises on writing M-language formulas, creating custom columns, and handling real-world data transformation challenges.
5. Can you customize a Power BI / Power Query training for our organization?
Yes. We conduct corporate workshops tailored to your business data. Sessions can focus on advanced Power Query transformations, automation, or integrating Power BI with Excel and SQL data.
6. How long does it take to become proficient in Power Query?
With guided learning, most professionals gain confidence in 2–3 weeks. Our structured roadmap ensures you learn by doing — from simple transformations to advanced custom columns and automation.
7. Do you also train on advanced Power BI topics beyond Power Query?
Yes – after mastering Power Query, you can continue to DAX, data modeling, and dashboard design through our advanced Power BI program. We provide a complete learning path.
8. I want to upskill my team — do you issue certificates of completion?
Yes. After completing the course or corporate workshop, participants receive a verified certificate of completion, demonstrating their practical understanding of Power Query and Power BI.
9. I’m not from a technical background — can I still learn Power Query?
Definitely! Power Query is designed for non-coders and business professionals. Our sessions simplify M-language formulas with visual demos and relatable examples.
10. How do I register or get course details?
Please refer to the link to the Complete Power BI plus pack.
Want to get training, e-mail us at partner@edu4sure.com or Call/WhatsApp at +91-9555115533.
