Forum Discussion
Microsoft optimization suggestion - using a shared query
- 1 year ago
Hi jaryszek
Sorry for the delayed reply.
Absoluletly, that would be the right order of query execution.
Did it work ? 👍 A kudos would be appreciated 📢 Mark it as a solution to help spreading knowledge
Hi jaryszek ,
Thanks for posting in Microsoft Fabric Community.
When you define a shared query like SyntheticBasePath, Power Query evaluates it once and stores the result in memory. Other queries that reference this shared query will use that value directly without recalculating it. This helps avoid hardcoding values like file paths in multiple places and makes the solution easier to maintain if the environment changes.
This approach follows best practices in Power Query. As mentioned by DataVitalizer ,defining reusable queries or parameters instead of duplicating logic improves clarity and reduces the chance of errors when updates are required.
Please refer to this for best practices in Power Query: Best practices when working with Power Query - Power Query | Microsoft Learn
Hope this helps. Please reach out for further assistance.
Thank you.