The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I am looking to do exactly what is in this post below except instead out outputting the number of complete days, I need partial days also.
https://community.powerbi.com/t5/Desktop/DATEDIFF-Working-Days/td-p/130662
i.e.
Start Date/Time = 14/04/2022 07:45
End Date = 14/04/2022 13:45
RESULT = 0.25
Start Date/Time = 14/04/2022 08:33
End Date = 20/04/2022 14:07
RESULT = 6.23
You can get this by a simple subtraction calc but I need to filter out working days which wont work with the suctraction. The only way I can really think of working it out is to possibly caculate it all in minutes and filter out days by subtracting 1440 minutes for each day that is not a workday.
Cheers,
JP
Solved! Go to Solution.
Hi @JPScotland ,
You can refer to my answer to this case, which is calculated to the hour.
And you could use the following to create date table with minute:
Table.FromColumns({List.DateTimes(#datetime(2017,1,1,0,0,0),365*1440,#duration(0,0,1,0))}, type table[DateTime=datetime])
The overall idea is to eliminate the total number of rows for the weekend between the two time differences, and then count by 60 (minutes) divided by 24 (hours).
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Thanks mate. Appreciate you taking the time to reply 🙂
Hi @JPScotland ,
You can refer to my answer to this case, which is calculated to the hour.
And you could use the following to create date table with minute:
Table.FromColumns({List.DateTimes(#datetime(2017,1,1,0,0,0),365*1440,#duration(0,0,1,0))}, type table[DateTime=datetime])
The overall idea is to eliminate the total number of rows for the weekend between the two time differences, and then count by 60 (minutes) divided by 24 (hours).
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien