Forum Discussion
Calculated columns in DAX vs computed columns in Power Query
- Anonymous2 years ago
Hi Anonymous ,
In general, choosing between calculated columns in DAX and calculated columns in Power Query depends on a number of factors, and here are some considerations for both approaches:
- Calculated columns in DAX:
Performance: Calculated columns in DAX are computed in the row context of the query, and they can affect query performance. However, for simple calculations, such as the number of months between two dates, the impact is usually negligible. - Calculated columns in Power Query:
Performance: Calculated columns in Power Query are applied during the data loading process and have the potential to improve query performance. These steps are performed in the M language and may be more efficient for some operations.
In your scenario, using calculated columns in DAX is straightforward if the dates are in the same table or if associations can be easily established. You can evaluate the performance impact and adjust your approach based on test results.For more details, you can read below blog:
Comparing DAX calculated columns with Power Query computed columns - SQLBI
Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Calculated columns in DAX:
Hi Anonymous ,
In general, choosing between calculated columns in DAX and calculated columns in Power Query depends on a number of factors, and here are some considerations for both approaches:
- Calculated columns in DAX:
Performance: Calculated columns in DAX are computed in the row context of the query, and they can affect query performance. However, for simple calculations, such as the number of months between two dates, the impact is usually negligible. - Calculated columns in Power Query:
Performance: Calculated columns in Power Query are applied during the data loading process and have the potential to improve query performance. These steps are performed in the M language and may be more efficient for some operations.
In your scenario, using calculated columns in DAX is straightforward if the dates are in the same table or if associations can be easily established. You can evaluate the performance impact and adjust your approach based on test results.
For more details, you can read below blog:
Comparing DAX calculated columns with Power Query computed columns - SQLBI
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.