Hi,
I hope someone can help. I have a report grouped by EmplId and Ded Code.
The detail records coming in are similar to the following:
EmplId Ded Code PayEnd Dt EmplyeContr EmplyrContr #Times
1010 S100 2010/09/09 0.0 25.00 4
1010 S100 2010/09/09 10.00 0.0 4
1010 S100 2010/09/16 0.0 25.00 4
1010 S100 2010/09/16 10.00 0.0 4
1010 S100 1900/01/01 0.0 0.0 0
1010 S200 2010/09/09 0.0 25.00 3
1010 S200 2010/09/09 10.00 0.0 3
1010 S200 2010/09/16 0.0 25.00 3
1010 S200 2010/09/16 10.00 0.0 3
1010 S200 1900/01/01 0.0 0.0 0
I need to calculate the #Times Remaining so my group report by Emplid/Ded Code looks as follows
EmplId Ded Code EmplyeContr EmplyrContr #Times #TimeRemain
1010 S100 10.0 25.00 4 2
1010 S200 10.0 25.00 3 1
I dont want to include the row with 1900/01/01 in my formula. These rows are from another record and contain Comp Rate that I need for calculation.l The rows with PayEndDt 2010/09/09 and 2010/09/16 are from the pay and I need them in calculating #TimeRemain.
I created a field formula
{SJ000147.NBR_TIMES} (DistinctCount({@Payend_Date, @Ded_Code})
Formula @Payend_Date
If {SJ000147.Payend_Dt} > cdate(1900/01/01)
Then totext({SJ000147.Payend_Dt
Else
I am not getting the correct results.
Edited by Zuzanna - 20 Oct 2010 at 8:14am