Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Calculating Joiners & Leavers in Cumulative/Appended Report

Hi All,   I receive a report every week that consists of our current workforce and, each week, I append it to the previous week's report. My ultimate goal is to allow the user select a specific Rep...
  • ryan_mayu's avatar
    1 year ago

    Anonymous 

     

    you can try this

     

    Column =
    var _next=maxx(FILTER('Table','Table'[Report Date Index]=EARLIER('Table'[Report Date Index])+1&&'Table'[Concat1]=EARLIER('Table'[Concat1])),'Table'[Concat1])
    return if('Table'[Concat1]="",0,if('Table'[Report Date Index]=max('Table'[Report Date Index]),0,if(_next<>"",0,1))
    )
     
    Column 2 =
    var _next=maxx(FILTER('Table','Table'[Report Date Index]=EARLIER('Table'[Report Date Index])+1&&'Table'[Concat2]=EARLIER('Table'[Concat2])),'Table'[Concat2])
    return if('Table'[Column]=0,0,if('Table'[Report Date Index]=max('Table'[Report Date Index]),0,if(_next<>"",0,1))
    )
     
    Column 3 =
    var _last=maxx(FILTER('Table','Table'[Report Date Index]=EARLIER('Table'[Report Date Index])-1&&'Table'[Concat1]=EARLIER('Table'[Concat1])),'Table'[Concat1])
    return if('Table'[Concat1]="",0,if('Table'[Report Date Index]=min('Table'[Report Date Index]),0,if(_last<>"",0,1))
    )
     
    Column 4 =
    var _last=maxx(FILTER('Table','Table'[Report Date Index]=EARLIER('Table'[Report Date Index])-1&&'Table'[Concat2]=EARLIER('Table'[Concat2])),'Table'[Concat2])
    return if('Table'[Column 3]=0,0,if('Table'[Report Date Index]=min('Table'[Report Date Index]),0,if(_last<>"",0,1))
    )
     
    pls see the attachment below