Forum Discussion
Power Query or Calculated columns
- 3 months ago
Hi,
Thank you for contacting the Microsoft Fabric community forum.
Thanks for sharing the full query, this gives much better context on the refresh behavior. Based on the code shared, moving the flag columns from Power Query to DAX calculated columns would likely not provide significant benefit, since most of the flags are simple row-level checks that are generally suitable for Power Query transformations during the ETL stage.
The query also contains multiple `Table.Group`, `Table.NestedJoin`, normalization, and buffering operations. Microsoft documentation notes that transformations, joins, grouping operations, and query folding behavior can affect refresh performance depending on the source and transformation sequence.
Your current country mapping approach using `Record.FieldOrDefault` is also a valid approach for smaller mapping lists.
Please refer the below documents
Understanding Query Evaluation and Query Folding in Power Query - Power Query | Microsoft Learn
Query folding indicators in Power Query - Power Query | Microsoft Learn
Use Calculation Options in Power BI Desktop - Power BI | Microsoft Learn
If I’ve misunderstood your needs or if you still encounter issues, please let us know.
Best Regards,
Community Support Team
if it's pure row logic, you can implement in Power Query. However, the speed may slower than DAX.
If you need relationships / lookup logic, then you have to use DAX. However, this column can't be found in Power Query, that means you can not re-use it in PQ.
You need to choose the proper solution based on your real situation.