### Title

Case/Sum/GetRepetition CalculationTrouble

### Post

I have a workaround in mind but I'd rather have the below attempted calculation work. The workaround will take some time and I just want to get this little area functioning.

I didn't want this to get lost in the shuffle from yesterday. I am still interested in knowing if there is any way that I can get my calculation to work.

Notice the layout picture. There are 14 repetitions that represent 2 sets of 7 days (Saturday thru Sunday per each set). I have two calculations. One calculation for each 7day set of repetitions. The calculations are identical except for the repetition field numbers.

I am wanting a calculation that adds ONLY those repetitions where "Frozen" has been selected. Thus my calculation should return a value of 17.23; but it does not.

Here is my calculation. Can anyone help me with what I am overlooking and/or doing incorrectly in writing the calculation?

Case(

FreezeYesNo = "Frozen" ;

Sum (

GetRepetition (TimestampActualDailyOT ; 1 );

GetRepetition (TimestampActualDailyOT ; 2 );

GetRepetition (TimestampActualDailyOT ; 3 );

GetRepetition (TimestampActualDailyOT ; 4 );

GetRepetition (TimestampActualDailyOT ; 5 );

GetRepetition (TimestampActualDailyOT ; 6 );

GetRepetition (TimestampActualDailyOT ; 7 )))

Thanks for your help.

I see no reason to use a repeating field here. You usually get simpler calculations and greater flexibility if you replace your repeating field with a portal to a related table.

I'm not sure that I understand the intent of your calculation. You have what appears to be a 14 repetition repeating field where either the repetition stores the text "Frozen" or is empty. Yet your calculation only refers to the first repetition of that field:

FreezeYesNo = "Frozen"

And if that first repetition is "Frozen" it sums the first 7 repetitions of the 14 repetition field of timestamps. If it is not, it returns a null (empty) result.