Forum Discussion
aflintdepm
Helper III
2 years agoUnmatching dates between payroll dates
Our company has 2 payroll cycles, A & B, that alternate weeks. Different pay groups are assigned to either A or B. Occasionally, a correction payroll gets run that falls out of cycle with A or...
- 2 years ago
aflintdepm Hi!
Create these two calculated columns in Location Table:
Previous Pay Date =VAR CurrentDate = 'Location Table'[Pay Date]VAR CurrentCycle = 'Location Table'[Cycle]RETURNCALCULATE(MAX('Payroll Dates'[Pay Date]),FILTER('Payroll Dates','Payroll Dates'[Pay Date] < CurrentDate &&'Payroll Dates'[Cycle] = CurrentCycle))Effective Pay Date =IF('Location Table'[Pay Date] IN VALUES('Payroll Dates'[Pay Date]),'Location Table'[Pay Date],'Location Table'[Previous Pay Date])Then calculate the measure:Total Amount =CALCULATE(SUM('Location Table'[Amount]),ALLEXCEPT('Location Table', 'Location Table'[Effective Pay Date], 'Location Table'[Location]))and use this in your table, output:BBF
ThxAlot
Super User
2 years agoSimple enough, just add a calculated column