Expression to calculate Hours worked over a month

Jaros
New Member

Hi Community, hope everyone is good today.

I have a question,

I am trying to build out an attendance register for a company that pays its wages once a month on the 15th of the month.

I have an Expression to calculate a weeks total hours, but lost when I need to try and get that to work across each month.

This is my formula for a particular week.

SUM(
SELECT(TimeCard[Calculated Time],
AND(
[WeekNum]=[_THISROW].[WeekNum],
[Year]=[_THISROW].[Year]
)
)
)

Any ideas?

0 3 124
3 REPLIES 3

Jaros
New Member

Thanks I saw this and read it but because I need to divide it in the middle of a month(At the 15th) so I thought getting the Week expression and somehow extrapolating that would be a better solution but Iโ€™m not sure now

Steve
Platinum 4
Platinum 4

Maybe this?

SUM(
  SELECT(
    TimeCard[Calculated Time],
    AND(
      ([date] >= (EOMONTH(TODAY(), -2) + 15)),
      ([date] < (EOMONTH(TODAY(), -1) + 15))
    )
  )
)

Replacing date with the name of the column that contains the timecard date.

See also:

Top Labels in this Space