Forum Discussion

Daniel_carle's avatar
Daniel_carle
Icon for Helper I rankHelper I
2 years ago
Solved

First Time Fix (New Job Raised Within 14 days)

Hello,   I need to be able to to calculate first time fix but with an additional check please, I've been able to identify 'Repair' jobs that have been completed first time but my organisation want ...
  • SamWiseOwl's avatar
    SamWiseOwl
    2 years ago

    COLUMN Repairwithin =
        VAR filttable =
            FILTER (
                Sheet1 --Remove all filters
                ,
                Sheet1[Job Category] = "Repair"
                    && Sheet1[Date] > EARLIER ( Sheet1[Date] )
                    && Sheet1[Date]
                        <= EARLIER ( Sheet1[Date] ) + 14
                    && Sheet1[ClientID] = EARLIER ( Sheet1[ClientID] )
            ) --Filter to only repairs that happen after current row and on or before 14 days in the future
        RETURN
            IF (
                Sheet1[Job Category] = "Repair"
                    && COUNTROWS ( filttable ) > 0,
                "Yes",
                "No"
            )
    --If the current row is a repair and the jobs is greater than 0 return Yes