Forum Discussion

rrhutch's avatar
rrhutch
Helper II
7 years ago
Solved

Problem Getting Measure to Give Closest Date Without Exceeding

I have a table of data like the following:   APPID SID YRTRM PROGRAM DEGREE STATUS DATE 1 11111 2019 Fall Undergrad BS Pending 1/8/19 1 11111 2019 Fall Undergrad BS Accept...
  • d_gosbell's avatar
    7 years ago

    This could be due to the ABS() in the MinDiff returning the same value if the differences is plus or minus x days.

     

    I would probably simplify this measure down to something like the following

     

    MyDate2 = 
    VAR SlicerDate =
        MAX ( dDate[DATE] )
    RETURN CALCULATE(max('App Data'[DATE])
      , Filter(all('App Data'[DATE]), 'App Data'[DATE] <= SlicerDate)
    )