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! Get ahead of the game and start preparing now! Learn more
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))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 8 | |
| 7 |