Forum Discussion

hprose's avatar
hprose
Icon for Helper I rankHelper I
3 years ago
Solved

Present in previous week but missing in current week

Hi all,   I have data roughly in the below format. For each week, I want to get the count of IDs that were present in the previous week but are missing in the current week. In the example below, Ap...
  • ThxAlot's avatar
    3 years ago
    Missing = 
    VAR __wk = MAX( STAT[week] )
    RETURN
        TOCSV(
            EXCEPT(
                CALCULATETABLE( VALUES( STAT[id] ), STAT[week] = __wk - 7 ),
                VALUES( STAT[id] )
            ),
            ,
            ,
            FALSE()
        )