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))
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 15 | |
| 8 | |
| 6 | |
| 5 | |
| 5 |