Software Development Community Question

Is it better to perform data transformations in Power Query or using DAX calculated columns?

Posted on 2025-08-18 • In Software Development • By Ronald Fisher

I have some messy data that needs cleaning—splitting columns, changing types, and creating some conditional logic. I’ve heard that DAX calculated columns can make the model larger. Should I be doing all of this "upstream" in the Power Query editor using M-language, or does it not really matter for the final report performance?

3 Answers 11,483 Views

All answers to this question 3 Answers

Helen Castro Answered on 2025-08-20
Answered

The rule of thumb is "as far upstream as possible." Whenever you create a DAX calculated column, that data is processed during the model refresh and stored in the RAM, but it isn't compressed as efficiently as the data loaded through Power Query. Furthermore, calculated columns don't benefit from "Query Folding" (where Power BI pushes the work back to the SQL server). Using Power Query (M) to clean your data ensures that your model remains lean and your refresh times stay fast. Save DAX for measures (aggregations like Sum, Average, etc.) rather than static data transformation.

Paul Higgins Answered on 2025-08-22
Answered

Are you worried about the complexity of M-language? I find the GUI in Power Query can do 90% of the work without you ever having to write a single line of code.

Scott Thornton Commented on 2025-08-24
Commented

Paul is right, the UI is very capable. Ronald, one tip: if you do use Power Query, try to put your "Filter" and "Remove Columns" steps at the very beginning. This triggers Query Folding on SQL sources, meaning the database does the heavy lifting and only sends the necessary rows to Power BI. This is much faster than downloading 1 million rows and then filtering them down to 10,000 inside the Power BI application itself.

Donna Myers Answered on 2025-08-25
Answered

Calculated columns also make your .pbix file size explode. If you're on the Free or Pro tier with the 1GB limit, you really need to stick to Power Query for transformations.

Ronald Fishe Commented on 2025-08-23
Commented

True that, Donna. I once reduced a file from 800MB to 200MB just by moving five complex calculated columns into the Power Query stage. It’s a massive difference.

Write a Comment

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

Join the LearnersEra Community

Ask questions, share knowledge and learn from professionals across technology, project management and certification topics.

Change Country and Nearest City

Select your country and nearest city to see courses available in your region.