Skip to main content

Hey all, I’ve got another (hopefully) easy question for y’all.

IF({Rental Fee}="", "", {Rental Fee} / {Open Duration})

Here’s what I’ve got. Open Duration is another equation where I used DATETIME_DIFF to calculate the number of months (success!). Rental Fee is a currency field where I plug in the numbers. What I really want to do is see how much the rental fee came out to per month.

Cool thing is that the IF field is working well enough, I only get #ERROR! on the fields where the equation is applicable. Not cool thing is the whole #ERROR! message bit. 😂 If rental fee is $10,000 and duration is 10, then why am I not getting $1,000?

I can’t figure out what I’ve done wrong. Any thoughts? Thank you in advance!

Hmm, your formula works fine for me, so I suspect there’s something about the table setup that’s different.  Could you provide a screenshot of your data please?

As an aside, you can also try simplifying your formula to the following as well!  

IF(
{Rental Fee},
{Rental Fee}/{Open Duration}
)

 


@TheTimeSavingCo

Thank you on the simplification! I always seem to make it more difficult. 🤦🏻 I feel like this equation is going to end up having the simplest fix, too.

Here’s how it’s looking with the simplification:

If it’s of any interest, when I go into formatting for Months Open, I’m unable to change the format. So, could it be that there’s some formatting somewhere that’s throwing things off? Spitballing because I am clueless.

Thank you for looking at this with me!


Hmm, ‘Months Open’ looks like it’s formatted as text as it’s aligned left, so I suspect that might be the issue?  If you look at the ‘Open Duration’ field in my screenshot you can see that it’s aligned right

 

Could you provide the formula for the ‘Months Open’ field please?


Welp! After simplifying the equation to match your suggestion, it switched to the right and now everything is working. 😂 Here’s that final equation:

IF({End Date}, DATETIME_DIFF({End Date}, {Start Date}, 'months'))

and what caused it to go sideways for some reason:

IF({End Date}=””, “”, DATETIME_DIFF({End Date}, {Start Date}, 'months'))

and for the Rental / Open:

IF({Rental Fee}, {Rental Fee} / {Months Open})

I do love my IF statements but that seems like a weird way to go sideways. I guess my takeaway is to continue working on simplifying my equations.

Thank you, ​@TheTimeSavingCo !!