Solved

Find latest date in date list metric


Hi!

 

I have a metric called “launch dates” with different project names.

 

Project     |     Launch Date

One                7/1/2022

Two                7/15/2022

Three              8/1/2022

Four                12/10/2022

 

From this metric (all the values are *date* type), I want to pull the latest date (in this case, 12/10/2022) into a new metric (LatestLaunchDate) to use it in a calculation. A simplified version of what I’m thinking would be:

=IF(Month.Year > LatestLaunchDate, 1, 0)

 

For any month prior to and including the month with the LatestLaunchDate, one calculation would apply. For any month after the LatestLaunchDate, a different calculation would apply.

 

I tried a few versions of the MAX and BY MAX modifiers/functions but didn’t get the result I wanted. 

icon

Best answer by Nathan 3 June 2022, 09:54

View original

2 replies

Userlevel 4
Badge +3

Hi,

 

you can do this by using the MAX of the remove modifier.

Try this example in the playground:

Launch date[Remove max: Project]

Thanks @Nathan ! I tried remove but not with the max function added. This works perfectly

Reply