ieller
(Ian Eller)
December 19, 2024, 8:35pm
1
Simple division percentage equation, but only if {Rebate Amount}>0. I am getting the proper calculations for other rows but the rows where {Rebate Amount}=0 I get invalid parameter.
I have tried:
IF({Deal Type}=“Standard”,0,{Reb Rec’d}/{Rebate Amount}*100)
IF({Rebate Amount}>0,{Reb Rec’d}/{Rebate Amount}*100,0)
IF({Rebate Amount}<>0,{Reb Rec’d}/{Rebate Amount}*100,0)
I have also done all the above using the divide function instead of just {Reb Rec’d}/{Rebate Amount}
I feel it must be something with roll ups, dividing by zero, or a text vs. number issue?
JCorrell
(Jim - The Monday Man)
December 20, 2024, 1:53pm
2
@ieller
Try:
IF(SUM({Rebate Amount}) <> 0, DIVIDE({Reb Rec'd}, {Rebate Amount}) * 100, 0)
Jim - The Monday Man
Get Custom Apps, Integrations & Automations for monday
ieller
(Ian Eller)
December 22, 2024, 6:30pm
3
Thanks, Jim. Looks like I am still receiving the same error.
GCavin
(Gilles Cavin - Reinventing Formulas in monday.com)
December 23, 2024, 2:25am
4
Hi @ieller ,
IF(SUM({Rebate Amount}) <> 0, DIVIDE({Reb Rec'd}, {Rebate Amount}) * 100, 0)
doesn’t work, because monday evaluates calculates the DIVIDE function before checking if {Rebate Amount} is 0 which therefore generates the error because you can’t divide by 0. That’s called the “Lazy approach” (for more on this, see A Simple Way to Handle Empty Columns and Avoid Errors in your Formulas )
Instead try:
{Reb Rec’d}/IF({Rebate Amount}<>0,{Rebate Amount},1000000000)*100
If {Rebate Amount}=0, it will divide by 10000000000 (could be any really high number) which will give you 0 without generating an error.
Want to take your formulas to the next level? Try the Advanced Formula Booster , the app that reinvents formulas in monday.
Create formulas without using the Formula column (and avoid its limitations)
Build formulas involving data from the previous item, the next item, the sub-items, the parent item, even items in the same group or the same board.
In one formula, update multiple columns from multiple items.
Check our blog for real use cases .
ieller
(Ian Eller)
December 25, 2024, 2:46pm
6
Thank you! This seemed to work for the most part. Only a couple values are still returning an error. I think I have it from here. Appreciate it!