Hi, Im trying to return an average price for each item but Im not sure how to get around the divide by zero error. Im thinking NULLIF needs to be applied but im not sure where. Any advice?
sum(case when {item.custitem_year}='2015' then {amount} else 0 end)/sum(case when {item.custitem_year}='2015' then {quantity} else 0 end)