Forum Discussion

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

How to return value based on max date within a group

I created a table of three columns that are pulling from another table. I want this created table to ultimately be grouped by ID_1, and pull in the value from ID_2 column based on the group's max Clo...
  • v-jianboli-msft's avatar
    3 years ago

    Hi lava_ ,

     

    Please try:

     

    Table = FILTER('DealsTable',[ClosingDate]=CALCULATE(MAX('DealsTable'[ClosingDate]),FILTER('DealsTable',[ID_1]=EARLIER(DealsTable[ID_1]))))

     

    Final output:

    Best Regards,

    Jianbo Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.