Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi all,
Hoping someone can help. We have a requirement for timesheets / payroll and need visibility of weekly hours and overtime.
We have a Start and End Time and contracted hours coming from data source, i am almost there but i cannot figure out the last part of splitting the overtime hours (which i have working) into Mon-Fri column and a Sat-Sun column.
All my below calculations work fine but i need to show if any of the days fall on a Sat-Sun and include that in the table
Calculated column for Total time worked - DATEDIFF(TimeSheets[ActualStart],TimeSheets[ActualEnd],MINUTE)
Calculated column for Total time excluding breaks - IF(TimeSheets[TotalTimeWorkedinMins] >=361,TimeSheets[TotalTimeWorkedinMins]-30,TimeSheets[TotalTimeWorkedinMins])
Calculated Column for Total Time in Hours - DIVIDE(TimeSheets[TotalTimeExcBreaks],60,0)
Measure to show if conducted overtime or just basic hours - IF(SUM(TimeSheets[TotalTimeHours]) > MAX(TimeSheets[ContractedHours]),"OT","Basic")
Measure for over time hours - sum(TimeSheets[TotalTimeHours]) - max(TimeSheets[ContractedHours])
This is the table i currently have and the layout is what the user would like to see. But they would like to also include a Mon-Fri column and Sat-Sun column instead of the OverTimeHours column. So if the start dates are all during the week it would show under Mon-Fri column, if any start dates worked on the weekend it would show under the Sat-Sun column.
I have tried
Hi, @DonnaDonut85 ;
Hi, @DonnaDonut85 ;
Try it.
Mon-Fri(f)_ =
IF (
ISBLANK ( TimeSheets[ActualStart] ),
BLANK (),
IF (
TimeSheets[IsActualStartWeekday] IN { 1, 2, 3, 4, 5 },
"Mon-Fri",
"Sat-Sun"
)
)
If I don't understand correctly, can you share a simple example or scenario and sample output will be better understood?
Or a sample pbix after removing sensitive data.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
91 | |
84 | |
76 | |
65 |
User | Count |
---|---|
145 | |
109 | |
109 | |
102 | |
96 |