Forum Discussion

hansei's avatar
hansei
Helper V
6 years ago
Solved

Help with Summarize

I'm having trouble understanding summarize and wonder if someone could help me? If I have a table as: NAME1 DATE1 NUM1 harry 1/1/2019 11 harry 3/1/2019 22 harry 2/1/2019 33 sa...
  • hansei's avatar
    6 years ago

    I ended up with this for my DAX:

    T2 = SUMMARIZE( 
        Table, Table[NAME1], 
        "DATE2", LASTDATE( Table[DATE1] ), 
        "NUM2", CALCULATE( FIRSTNONBLANK( Table[NUM1], 1 ), LASTDATE( Table[DATE1] ) )
    )

    wherein the temporary table returned from LASTDATE propagated filter to orginal Table and then to CALCULATE