on a saved search, grouped by customer. I want to ...
# suiteanalytics
j
on a saved search, grouped by customer. I want to have a calculation like: sum({tranestgrossprofit})/sum({netamountnotax}) to estimage the margin of transactions. but i can't work out how to do this. any pointers?
k
sum({transaction.desiredField}/nullif(sum({transaction.otherfield},0))
make your "grouping" type maximum.
j
ah thanks
I'll give that a go
k
you might have to play with your transaction selection criteria on your criteria tab so that it doesn't include transactions you don't want.
(also to help performance)
j
righto, thanks kevin
k
Should be noted - NS when you do stuff like that doesn't like "mixed" levels of aggregation. Everything has to be summarized in order for calucations to work.
(i.e you can't do a sum({field}/{field2}
also, i missed a parenthesis in my forumula before the "/"
so
sum({transaction.desiredField})/nullif(sum({transaction.otherfield},0))
j
the problem is that sum is not available on the formula field area
message has been deleted
see the highlighted area above
k
looks like you're missing your close parenthesis
j
good catch thanks