Skip to main content
Solved

Find latest date in date list metric

  • June 2, 2022
  • 2 replies
  • 207 views

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. 

Best answer by Nathan

Hi,

 

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

Try this example in the playground:

Launch date[Remove max: Project]

2 replies

Nathan
Employee
Forum|alt.badge.img+12
  • Employee
  • 227 replies
  • Answer
  • June 3, 2022

Hi,

 

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

Try this example in the playground:

Launch date[Remove max: Project]


  • Author
  • Wallflower
  • 1 reply
  • June 3, 2022

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