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
Hello All,
I´m struggling on how to solve a problem using Datediff function,
I have two columns, start and end date with dd/mm/hh format.
I need to show the hours that passsed between two dates in diferent days, but my problem is, I must only count the workday hours (9:00:00 am to 18:00:00 pm) and ( monday to friday)
My code just take total hours:
Servicios_Horas = DATEDIFF('Maester Estimaciones'[Fecha de Inicio Estimación],'Maester Estimaciones'[Fecha Fín Estimación],HOUR)has anybody got an idea on how i would approach this?
thanks, Ricardo
Solved! Go to Solution.
Thanks a lot Greg!
Your Quick measure was helpful to show my information in a nice format.
Thanks a lot Greg!
Your Quick measure was helpful to show my information in a nice format.
Use my Net Work Days quick measure to figure out the number of working days. Multiple by 24 and adjust depending on your start/end times. Sample data would help. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Net Work Days Quick Measure: https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362
Hi Greg,
Great solution with creating Network days function in power bi. Business days excluding holidays are accurate for my data output, but i am having trouble adjusting the code for business hours of 7:30am to 5pm. Where in the code do I adjust, and how do I adjust? Also, some date differences are under 1 hour, so would you able to code it for example '0 hours 13 minutes' as well?
Thanks,
Emma
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 137 | |
| 102 | |
| 71 | |
| 67 | |
| 65 |