Expression error pls help!

why this expression is not giving expected result

IFS(
(EOMONTH(TODAY(), -1) + 10) >= [Paid On],
    "0",
([Paid On]-(EOMONTH(TODAY(), -1) + 10))= 1,
    "20",
([Paid On]-(EOMONTH(TODAY(), -1) + 10))= 2,
    "30",
([Paid On]-(EOMONTH(TODAY(), -1) + 10)) = 3,
    "40",
([Paid On]-(EOMONTH(TODAY(), -1) + 10)) = 4,
    "50",
([Paid On]-(EOMONTH(TODAY(), -1) + 10)) = 5,
    "60",
([Paid On]-(EOMONTH(TODAY(), -1) + 10)) = 6,
    "70",
([Paid On]-(EOMONTH(TODAY(), -1) + 10)) = 7,
    "80",
([Paid On]-(EOMONTH(TODAY(), -1) + 10)) = 8,
    "90",
([Paid On]-(EOMONTH(TODAY(), -1) + 10)) = 9,
    "100",

  TRUE,
    "150"
)

I am trying to calculate late fees based on every month 10th is fixed date for payment and actual paid date for late fee

Solved Solved
0 7 110
1 ACCEPTED SOLUTION

Maybe you wish to try the below expression if you wish it to work for any month and year.

IF(DAY([Paid On])<=10, 0,
SWITCH(DAY([Paid on]) ,11 , 20, 12, 30, 13,40, 14, 50, 15, 60, 16, 70, 17, 80, 18, 90, 19, 100, 150)
)

Please write back if you wish the expression to work for only current month dates. If so, please also mention what you would like the exprssion to result into for other monthsโ€™ dates. We could modify the above expression accordingly.

View solution in original post

7 REPLIES 7

You may wish to elaborate exactly what problem you are facing when you mention below- is the expression is giving syntax error, incorrect results etc.

yes sir ! thank you
when payment made on or before due date no late fee calculated correctly, but other than that it is always 150 value is added which is not expected, I want as per the no of days delay and than else fixed 150 rs late fee. and due date is fixed of 10th oof month
thank you !

Maybe you wish to try the below expression if you wish it to work for any month and year.

IF(DAY([Paid On])<=10, 0,
SWITCH(DAY([Paid on]) ,11 , 20, 12, 30, 13,40, 14, 50, 15, 60, 16, 70, 17, 80, 18, 90, 19, 100, 150)
)

Please write back if you wish the expression to work for only current month dates. If so, please also mention what you would like the exprssion to result into for other monthsโ€™ dates. We could modify the above expression accordingly.

It is working perfectly thank you!

Thank you for the update. Nice to know you got it working as required.

thank you so much !
It is exactly working the way I want. Until you pointed out that what if someone is having due more than current month. I tried to use the due date in formula but not working.
if it is due more than month certain amount can be fixed.
thanks.

I am trying this if work let you know

IF(HOUR(today()- [Due Date])/24 <=10, 0,
SWITCH(HOUR(today()- [Due Date])/24 ,11 , 20, 12, 30, 13,40, 14, 50, 15, 60, 16, 70, 17, 80, 18, 90, 19, 100,20,110,21,120,22,130,23,140,24,150,25,160,26,170,27,180,28,190,29,200,30,210,500)
)
Top Labels in this Space