Get previous due date

Hi,
I am looking for a way to get the recent date out of multiple previous due dates. I tried sorting but it does not give the latest date out of all old dates

` CASE WHEN
instr(
  [Measures].[Issue Estimated QA completion Date old values], ","
) > 0
THEN
Generate(
    Filter(
      -- get relevant dates from Time dimension
    [Time].CurrentHierarchy.Levels("Day").Members,
    AnyDateInPeriod(
      [Measures].[Issue Estimated QA completion Date old values],
      [Time].CurrentHierarchyMember
    )),
  -- apply the new formatting
  Format([Time].CurrentHierarchyMember.StartDate, 'MMM dd yyyy'),
  ",  ")
ELSE
  Format(DateParse([Measures].[Issue Estimated QA completion Date old values] ), 'MMM dd yyyy')
END`

Hi @jrajesh,

​Could you please explain a bit more about what you consider to be “the recent date”?

Are you looking for the latest date in the list or the last assigned value?

​If you are looking for the last assigned value, the main question is how the multi-value field is built - every new value comes at the beginning or the end. Then you might use Left() or Right() function to extract the first or the last entry from the string of multiple values.

​If you are looking for the latest date, you might Order() the set of retrieved Time dimension members by their .StartDate value and use Head() or Tail() to retrieve the first or the last entry after ordering.

​Regards,
​Oskars / support@eazyBI.com