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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I need some M code in order to calculate the number of weeks between to dates, someone could help me how can I handle this issue, also I was able to handle this using DAX but, I need to calculate the total weeks on Power Query side
Thanks
Solved! Go to Solution.
Hi @Rigolleto
As tested, az38's suggestion is helpful.
Hi @Rigolleto
As tested, az38's suggestion is helpful.
Hi @Rigolleto
I've got no idea how do you get 5 weeks from 28-days period but try a custom column like
= Number.RoundUp(Number.From(([end day]-[Start day])/7))
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.