Forum Discussion

scabral's avatar
scabral
Icon for Helper IV rankHelper IV
6 years ago
Solved

get max date column within group

Hi,   i have the following table with claim payment rows as follows:   Claim Id Location ID Policy ID Damage  Reserve Dt Reserve Amt 1 234 333 Fire 6-9-2014 200 1 234 333 Fi...
  • Anonymous's avatar
    Anonymous
    6 years ago
    // Say, your table is T.
    
    [Max Reserve Date] = // calc column in T
    var __claimId = T[Claim ID]
    var __locationId = T[Location ID]
    var __policyId = T[Policy ID]
    var __result =
        MAXX(
            filter(
                T,
                T[Claim ID] = __claimId
                &&
                T[Location ID] = __locationId
                &&
                T[Policy ID] = __policyId
            ),
            T[Reserve Date]
        )
    return
        __result