In a transaction list sorted by employee and effective date, how do I create a property that shows the next row's effective date for the same employee (or TODAY() if it's the last row)?"
How to calculate end dates in transaction list using next row's effective date (grouped by employee)
Best answer by JDLove
Hi Sorry for late reply,
I have made a quick prototype to test a new approach as I also could not get the initial code working.
Blocks 2
1. Transaction List called “data”
Properties:
Employee is a dimension type to Employee dim
Index = RANK(data.EffectiveDate, data.Employee, ASC)
PreviousIndex IF(data.Index = 1,ITEM(1,Sequence.'Sequence Number') ,ITEM(data.Index-1,Sequence.'Sequence Number'))
NextEffectiveDate = IFDEFINED ( data.Index, DateLookup[BY: data.Employee,data.PreviousIndex],CurrentDate)
2. Helper Metric called “DateLookup”
2 Dims ( Employee, Sequence )
Sequence dimension is just a list to hold the sequence date for each Employee
Formula = data.EffectiveDate[BY FIRSTNONBLANK: data.Employee , data.PreviousIndex]
Concept was in these steps
1 Rank the Employee transactions (Index)
2 calculate the previous rank number (PreviousIndex)
3 Use helper Metric to pass the PreviousIndex Date (NextEffectiveDate)
Seems to work if alittle basic, I hope it helps and you can improve on it. I had hoped to upload screenshots but I was unable to upload any images tonight.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.


