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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
newpbiuser01
Helper V
Helper V

Merging and Calculated Columns in Power Query vs Calculated Columns

Hello,

 

I have a general question about creating calculated columns and merging tables in power query vs. dax. I have two tables - one with the sales data and another with payment information and need to merge a couple of columns from the payment to the sales table. Is it generally better to merge the tables in power query for faster performance (for tables with over 9 million rows) or do it in dax by creating a relationship between the tables? How about creating calculated columns (that need to be calculated at the row level and not aggregated so can't use a measure)?

 

I was under the impression that it was better to do it in power query so once the model was loaded, the report loading time and interaction time would be shorter. But the more I look into it, it sounds like dax would be the way to go? I'd really appreciate any insight! 

 

Thank you!

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

Star schema is the prefered approach for tabular models (i.e. DAX, so tables with relationships). That said I would recommend doing as much of the data preparation as possible in PowerQuery (with the cost of the model refresh being slightly longer), and avoid calculated columns at all (they come with a cost of using additional memory, and are not really necessary for the row level calculations - that's what the iterator functions like SUMX are for https://dax.guide/sumx/)

A very good article describing the differences in more detail:
https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @newpbiuser01 ,

 

Whether the advice given by @Stachu  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

Stachu
Community Champion
Community Champion

Star schema is the prefered approach for tabular models (i.e. DAX, so tables with relationships). That said I would recommend doing as much of the data preparation as possible in PowerQuery (with the cost of the model refresh being slightly longer), and avoid calculated columns at all (they come with a cost of using additional memory, and are not really necessary for the row level calculations - that's what the iterator functions like SUMX are for https://dax.guide/sumx/)

A very good article describing the differences in more detail:
https://www.sqlbi.com/articles/comparing-dax-calculated-columns-with-power-query-computed-columns/



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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