Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I currently have a table called acc_monitor_log with columns:
I would like to calculate the hours worked for each day of every month based on the first time they entered for work & the last time, irrespective of the door they entrered or exited.
Hi @rush,
According to your description, you want to calculate the daily work hours and get the monthly total,right?
If this is a case, you can refer to below steps:
1. Add a calcuale column to calculate the daily work hours.
Daily Diff = var temp= FILTER(Table,[Time].[Date]=EARLIER(Table[Time].[Date])&&[Pin]=EARLIER([Pin])&&[device_name]=EARLIER([device_name])) return DATEDIFF(MINX(temp,[Time]),MAXX(temp,[Time]),MINUTE)
2. Summary above table with same month.
Summary = SUMMARIZE(Table,[Pin],[device_name],[Time].[Month],"Total Minute",SUM(Time[Daily Diff]),"Total Hour",SUM(Time[Daily Diff])/60)
Regards,
Xiaoxin Sheng
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.