Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Fill in Missing End Dates in Table

I have a table where ever once in a while there is missing data on one of the date fields that calculates the production time of an item. Basically, I have a start date but sometimes I don't get an e...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Try this

    Adj Date =
    IF(
      ISBLANK(Table[End Date]),
      VAR id = Table[ID]
      VAR order = Table[Order]
      VAR tbl = 
        FILTER(
          Table,
          Table[ID] = id && Table[Order] > order
        )
      RETURN
      IF(COUNTROWS(tbl) > 0, MINX(tbl, [Start Date]))