can you share your formula?
# suiteanalytics
k
can you share your formula?
b
one field is just getting normal {amount}
other is getting only amount when a checkbox is checked: round(case when {custbody_omni_created_from_po}= 'T' then {amount} else 0 end, 0)
they both add up correctly when grouping and summing on those fields
but I'm getting errors when doing something like: {amount}/(case when {custbody_omni_created_from_po}= 'T' then {amount} else 0 end) and having that come up with the summary results as a calculation between the two summed fields
p
sounds like you might need to wrap the denominator in a NULLIF
also you're ELSE is telling it to divide by amount 0 which would give an error
a
that formula has a divide by 0.
g
need to wrap numerator and denominator in a SUM(), and wrap denominator in NULLIF, like @pmendola suggested.
a
exactly
b
Thanks, guys!
That worked. In one attempt, I was trying to remove possible zero values in the denominator, but I now understand how nullif does a good job at that.
👍🏻 1