Forum Discussion
Greg_Davurse
Helper I
9 years agoCalculate No Payment Last 2 rolling weeks
Hi All, I’m trying to calculate the number of weeks an employee hasn’t been paid for the last two weeks and I’m completely stuck. I need to return either ‘0’ indicating paid both weeks, ‘1’ indi...
- 9 years ago
There is probably a better formula for this but this should work
Trial1 = IF(ISBLANK( CALCULATE(COUNTROWS(Table1),DATESBETWEEN(DateTable[date],TODAY()-14,TODAY())))
,2,
MOD(CALCULATE(COUNTROWS(Table1),DATESBETWEEN(DateTable[date],TODAY()-14,TODAY())),2))
MarkS
Resolver IV
9 years agoHi Greg,
Sorry I think that I misinterpreted what you were looking for.
If you just have the employee and the measure it will work, but not when dates are added.
Greg_Davurse
Helper I
9 years agoMi Mark,
Thanks for the response. If I can create the table you have shown on your last post, that will serve as a temporary fix. I would just have two tables. One showing the actual payments and one showing the employee name with '2', '1' , or '0'.
Let me see what I come up with and I'll let you know.
Thanks,
Greg