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
Calculated columns are computed by the VertiPaq engine after data is loaded into memory. They consume model RAM, cannot be folded back to the source, and are recalculated on every refresh. Power Query transformations, on the other hand, happen during the ETL phase, benefit from query folding (if your source supports it), and result in a smaller, more efficient model.