Forum Discussion

Greg_Davurse's avatar
Greg_Davurse
Icon for Helper I rankHelper I
9 years ago
Solved

Calculate 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...
  • MarkS's avatar
    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))