This isn’t the prettiest formula, but it worked fo...
# suiteanalytics
j
This isn’t the prettiest formula, but it worked for me:
SUM(CASE WHEN {type} = 'Credit Memo' OR {type} = 'Cash Refund' THEN {amount} ELSE 0 END) / SUM(NULLIF(CASE WHEN {type} = 'Cash Sale' OR {type} = 'Invoice' THEN {amount} ELSE 0 END,0))