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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

PowerQuery column or DAX group?

When should I lean on a specific solution instead of the other one?
Which one is the least computationally heavy?

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Normally, the column performance in Power Query will be better than the calculated column in DAX.

Because a column with better compression is smaller in memory and usually provides better performance levels. This is important in filter, group, and aggregation operations involving the column. The compression of a DAX calculated column might be lower than that of a Power Query computed column.

 

So if you can do it in Power Query/M, you should (except when you are adding a column to a table that references a column in a different table).
If a calculated column or a measure will work, use a measure.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Normally, the column performance in Power Query will be better than the calculated column in DAX.

Because a column with better compression is smaller in memory and usually provides better performance levels. This is important in filter, group, and aggregation operations involving the column. The compression of a DAX calculated column might be lower than that of a Power Query computed column.

 

So if you can do it in Power Query/M, you should (except when you are adding a column to a table that references a column in a different table).
If a calculated column or a measure will work, use a measure.

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

mahoneypat
Employee
Employee

Please see this article.  However, you should use a measure as your first option unless you definitely need a column (for an axis, legend, etc.). In practice, there isn't a big difference for most models but I typically do it in the query if I can (so it is compressed upon loading).

Comparing DAX calculated columns with Power Query computed columns - SQLBI

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors