Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I have a custom function that works well in Power BI Desktop. Using the customer function I am trying to generate monthly records in between two given dates. I am trying to move the power query to fabric data lake to keep the table available for other users. The same custom function that comes back quickly (2-3 mins) in Power BI Desktop power query takes forever and times out after 10 mins in Fabric Dataflow Gen2. This makes me think that Fabric Dataflow Gen2 is not ready for custom functions and forces us to Power BI Desktop. Anyone experiencing same issue? Below the M code used for the custom function.
= (From as date, To as date) =>
let
NoOfIntervals = (Date.Year(To)*12+Date.Month(To))-(Date.Year(From)*12+Date.Month(From)),
Result = List.Transform({0..NoOfIntervals}, each Date.AddMonths(From, _))
in
Result
Tried this but no luck. Same issue. Runs for 10 mins and timeout.
Maybe try something simpler?
= (From as date, To as date) => List.Generate(()=>From,each _ <= To, each Date.AddMonths(_,1))
Tried this but no luck. Same issue. Runs for 10 mins and timeout.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 8 | |
| 8 | |
| 7 |