The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Case: I have two date/time fields in Power BI and I am trying to calculate the difference between them. I would like this result to include both days between and time between. The fields I am referring to reside in the ORDHFILE and the columns are Ordrem3 (start time) and Ordrem4 ( end time).
Problem: I can create a measure that calculates the days between and the time between but I cant seem to account for working days or working hours only. I have uploaded our holiday table from chempax, created a relationship with the date table you created and been able to create measures for both working days and holiday days. However, I get stuck there and I still cant seem to tie all of that together to achieve my desired result. Below is an example of what we would like the formula to accomplish:
Example: BL 111111 has start date of 7/17/2017 4:25 PM and end date of 7/24/2017 1:01 PM
The result should be 5 working days and 5 hours and 36 working minutes ( assuming an 8am-5pm work day)
**NOTE: Ideally we would like to set the work day based on the employee as some work 7am-4pm etc. **
Take a look at the techniques here:
http://community.powerbi.com/t5/Desktop/Aggregating-Duration-Time/m-p/13350/highlight/true#M3358
I'm thinking using a DATEDIFF with SECONDS and then converting it back to day/time format.