Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Get next date in a list

This question is two-fold:   I have a list of projects, each with several milestones and associated dates. See an example of one project below that has milestones ("Action Title") and milestone dat...
  • v-ljerr-msft's avatar
    8 years ago

    Hi Anonymous,

     

    Based on my test, you should be able to use the formulas below to create two measures to get next date and milestone for an Id.

    Next Date = 
    var currentDate = TODAY()
    var currentID = MAX(Table1[Id])
    return
    CALCULATE(MIN(Table1[Deadline]),FILTER(ALL(Table1),Table1[Id]=currentID&&Table1[Deadline]>=TODAY()))
    Next Milestone = 
    var currentDate = TODAY()
    var currentID = MAX(Table1[Id])
    return
    CALCULATE(MIN(Table1[Action Title]),FILTER(ALL(Table1),Table1[Id]=currentID&&Table1[Deadline]>=TODAY()))

     

    Here is the same pbix file for your reference. :smileyhappy:

     

    Regards