Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Creating Dummy Date Field?

I have this table:   It shows over time when someone owned an account. I was provided an entry date only, so I had to come up with a date field to represent their exit date which is simply ...
  • PattemManohar's avatar
    7 years ago

    Anonymous Please try this...

     

    ExitDate = 
    VAR _ExitDate = CALCULATE(MIN(Test66Lkp[EntryDate]),FILTER(ALL(Test66Lkp),Test66Lkp[Code]=EARLIER(Test66Lkp[Code]) && Test66Lkp[Name] <> EARLIER(Test66Lkp[Name]) && Test66Lkp[EntryDate] > EARLIER(Test66Lkp[EntryDate])))
    RETURN IF(_ExitDate=BLANK(),DATE(2100,12,31),_ExitDate)