# How to calculate fee based on package size, incurred daily 60 days after [Date Received] to a max of 30 days

• 0
• Question
• Updated 6 months ago
• In Progress
Here are the criteria:
• 3 different [Package Size]
• each [Package Size] has a different fee
• fees are calculate after 60 days after [Date Received]. On the 61st day, the fee begins.
• fees are charged daily, and up to a max of 30 consecutive days.
In for the formula below, on 61 days the fee should be \$0.50, then at 90 days it should accrued to \$15, instead it calculates a total of only \$0.50 when the [Date Received] was in 2017.

var number DaysOverDue = Min(90, ToDays(Today()-[Date Received]));
If(([Package Size]="Light" or [Package Size]="Regular") and (\$DaysOverDue>60),(\$DaysOverDue-60),0.5)

And how do I add another If package size to the formula?
• 192 Points Posted 6 months ago

• 0
• 2,592 Points What field type is [Date Received]?
• 192 Points it's a date type
• 1,386 Points Not sure exactly what you are looking for, but take a look at the formula  below. Let me know if that helps.

var number DaysOverDue = Min(90, ToDays(Today()-[Date Received])); //# of days late or 90, which ever is smaller

If(
([Package Size]="Light") and (\$DaysOverDue>60),((\$DaysOverDue-60)*.5), //50 cents every day after 60 days
([Package Size]="Regular") and (\$DaysOverDue>60),((\$DaysOverDue-60)*.75), //75 cents every day after 60 days
([Package Size]="Large") and (\$DaysOverDue>60),((\$DaysOverDue-60)*1), // 1 dollar every day after 60 days
0)