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
Hello,
The general rule of thumb is to move steps as far upstream as possible in the ETL. So, if you are able to add the true/false column in your transform steps (i.e. m code portion), that would be the recommendation.
For your country question, could you elaborate on what you mean by "mapping values"?