Forum Discussion

StaceyG's avatar
StaceyG
Helper I
5 years ago
Solved

Lookup latest date

Hello all you brilliant minds!

 

I have two tables, on has a single row per Opportunity, including the Opportunity ID and current Stage Name.  The other has the Stage History, multiple rows per Opportunity ID, with Stage Name and date of Stage change.

 

I created a column in each table which concatenates the Opportunity ID and Stage (as OpIDStage), so that I can lookup the date value in the Stage History table and include it in the Opportunity table.  However, there are cases where the stage was regressed, so there are multiple rows including the same OpIDStage.  How can I lookup only the latest date for the corresponding OpIDStage?

 

 

 

Thanks for your help!

  • StaceyG 

    Assuming the tables are joined like this.

    Give something like this a try.

    Latest Date = CALCULATE( MAX ( 'Stage History'[Date] ) )

     

     

2 Replies

  • StaceyG 

    Assuming the tables are joined like this.

    Give something like this a try.

    Latest Date = CALCULATE( MAX ( 'Stage History'[Date] ) )