Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
amien
Helper V
Helper V

Key from 2 combines fields : Difference between Add Calculated column or add column in query editor

I want to combine two columns within the same table. This new column can be used to link to a different table.

There are two options here:

 

1. Create a calculated column using DAX in the PowerBI Desktop

2. Add a Custom Column in the Query Editor.

 

Both will work. But what is the difference and i what cases should i use which option?

1 ACCEPTED SOLUTION
TaylorClark
Power BI Team
Power BI Team

 

Here are the basic differences:

1. Evaluation time: Query columns are evaluated at query (data refresh) time. Calculated columns are evaluated at data model processing time.

2. Language used: Query columns use a functional language known as M (Quick Reference). Calculated columns use DAX (Quick Reference), the same language used in Measures.

3. What they can reference: Query columns can reference other queries, steps in the current query, and custom functions. Calculated columns can reference data loaded to the data model.

 

When should you use each?

There aren't any hard and fast rules about when to use one option over the other. It's usually case-specific. As you start to learn DAX and M, you'll realize their overlap is actually smaller than you might have expected -- they're designed for solving different problems. M is much more flexible and "general purpose", whereas DAX is designed specifically to perform analytics on tables. As a result, here's my advice:

 

1. Use whichever feels more comfortable to you. If you can easily write the expression in the query with M, go ahead. If it's simpler to express it in DAX, use it. I expect the languages will usually make the decision for you 🙂

2. Adding a query column requires the query and any referencing queries to be refreshed. Depending on the size of your dataset, this may be prohibitive and you may lean towards calculated columns for practicality.

 

Personally, I use both gratuitously. If I'm planning ahead and know I need the column at the time that I'm writing the query, I add it in the query editor. A small benefit here is that the column is included if you decide to copy your query into another PBIX file. If I realize I need something as I'm building measures and visuals, I probably add it as a calculated column.

 

Hope this helps! Let me know if you have any other questions

View solution in original post

2 REPLIES 2
TaylorClark
Power BI Team
Power BI Team

 

Here are the basic differences:

1. Evaluation time: Query columns are evaluated at query (data refresh) time. Calculated columns are evaluated at data model processing time.

2. Language used: Query columns use a functional language known as M (Quick Reference). Calculated columns use DAX (Quick Reference), the same language used in Measures.

3. What they can reference: Query columns can reference other queries, steps in the current query, and custom functions. Calculated columns can reference data loaded to the data model.

 

When should you use each?

There aren't any hard and fast rules about when to use one option over the other. It's usually case-specific. As you start to learn DAX and M, you'll realize their overlap is actually smaller than you might have expected -- they're designed for solving different problems. M is much more flexible and "general purpose", whereas DAX is designed specifically to perform analytics on tables. As a result, here's my advice:

 

1. Use whichever feels more comfortable to you. If you can easily write the expression in the query with M, go ahead. If it's simpler to express it in DAX, use it. I expect the languages will usually make the decision for you 🙂

2. Adding a query column requires the query and any referencing queries to be refreshed. Depending on the size of your dataset, this may be prohibitive and you may lean towards calculated columns for practicality.

 

Personally, I use both gratuitously. If I'm planning ahead and know I need the column at the time that I'm writing the query, I add it in the query editor. A small benefit here is that the column is included if you decide to copy your query into another PBIX file. If I realize I need something as I'm building measures and visuals, I probably add it as a calculated column.

 

Hope this helps! Let me know if you have any other questions

Hi @TaylorClark,

Could you please share more about data refresh time and data model processing time, cause This is new concept to me and would like to be aware them.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.