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

  • 0
  • 1
  • Question
  • Updated 3 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?
Photo of Dang Thai

Dang Thai

  • 172 Points 100 badge 2x thumb

Posted 3 months ago

  • 0
  • 1
What field type is [Date Received]?
Photo of Dang Thai

Dang Thai

  • 172 Points 100 badge 2x thumb
it's a date type
Photo of Slider

Slider

  • 1,346 Points 1k badge 2x thumb
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)