Forum Discussion
Beschleunigung meines M-Code
Hi lud_ex,
Thank you for the update.
Based on my understanding, the key point is that the long refresh time may be expected. The solution depends on row-by-row, stateful logic with cross-day and cross-employee dependencies, which Power Query must evaluate sequentially and which may not scale for multi-year planning. Although the template or hour‑balancing approach might be conceptually valid, Power Query and Power BI/Fabric are intended for deterministic data preparation rather than for constraint-based scheduling or dynamic optimisation. They might lack native capability to balance hours across employees while enforcing rules such as vacations, skills and alternation.
One approach would be to use Power Query only to prepare calendar, holiday and absence data, and to generate or import a precomputed schedule from an external planning layer for example, Excel, Power Automate, or Fabric Notebooks with Python. Power BI can then be used for analysis and validation (monthly hours, distributions and compliance).
If native scheduling or optimisation within Power BI or Fabric is required, kindly raise the suggestion in the Ideas forum using the link:Fabric Ideas - Microsoft Fabric Community
Additionally, please refer to the links provided:
The Power Query user interface - Power Query | Microsoft Learn
Best practices when working with Power Query - Power Query | Microsoft Learn
Understanding query evaluation and query folding in Power Query - Power Query | Microsoft Learn
We hope this information helps to resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.
Thank you.
Hallo
Dankeschön dir auch deine Hilfe v-pnaroju-msft.
Ich werde mir in ruhe diese Links anschauen.
So wie es bisher aussieht muss ich mich wohl leider geschlagen geben und muss wohl mit meinem bisherigen Code zufrieden geben, und dies so hin nehmen wie es ist zur Zeit.
Danke nochmals an alle Helfer bisher.