cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Count the number of times employees charged more than 40 per week by EndOfWeek

Hello Community,

I summarized regular hours recorded by the EndOfWeek, and I'm trying to count the number of times this has occurred for semi-monthly pay periods where more than 40 per week have been recorded and those hours need to be moved to overtime .  This is what I have so far:

 

Count of Hours Over 40 by Week =
VAR R_HoursOver40 =
IF (
CALCULATE (
SUM ( Timesheetlines[ENTERED_HRS] ),
Timesheetlines[Type] = "R",
ALLEXCEPT ( Timesheetlines, Timesheetlines[EndOfWeek] )
) > 40,
COUNT(Timesheetlines[EMPL_ID]),
0
)
RETURN
R_HoursOver40
 
Thanks in advance!
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

@walkerb32 ,

Hours >40

SUMX(filter(Summarize(Timesheetlines,Timesheetlines[EMPL_ID], Timesheetlines[EndOfWeek],"_1",SUM ( Timesheetlines[ENTERED_HRS] )),[_1]>40),[_1])

Occurance , where Hours >40

Countx(filter(Summarize(Timesheetlines,Timesheetlines[EMPL_ID], Timesheetlines[EndOfWeek],"_1",SUM ( Timesheetlines[ENTERED_HRS] )),[_1]>40),[EMPL_ID])

 

Employee Count, where Hours >40
Countx(summarize(filter(Summarize(Timesheetlines,Timesheetlines[EMPL_ID], Timesheetlines[EndOfWeek],"_1",SUM ( Timesheetlines[ENTERED_HRS] )),[_1]>40),[EMPL_ID]),[EMPL_ID])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
Highlighted
Super User IV
Super User IV

@walkerb32 ,

Hours >40

SUMX(filter(Summarize(Timesheetlines,Timesheetlines[EMPL_ID], Timesheetlines[EndOfWeek],"_1",SUM ( Timesheetlines[ENTERED_HRS] )),[_1]>40),[_1])

Occurance , where Hours >40

Countx(filter(Summarize(Timesheetlines,Timesheetlines[EMPL_ID], Timesheetlines[EndOfWeek],"_1",SUM ( Timesheetlines[ENTERED_HRS] )),[_1]>40),[EMPL_ID])

 

Employee Count, where Hours >40
Countx(summarize(filter(Summarize(Timesheetlines,Timesheetlines[EMPL_ID], Timesheetlines[EndOfWeek],"_1",SUM ( Timesheetlines[ENTERED_HRS] )),[_1]>40),[EMPL_ID]),[EMPL_ID])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors