Hello - New user here, try to be patient.
I have a saved transaction search which shows inventory quantity on hand, available, and calculates the average quantity sold over the previous 12 weeks. I would further like to compare this average value to the quantity available, but keep getting an unexpected error (no details... gotta love those). Below is the formula I am using to calculate the average weekly quantity sold, and the latest formula I used trying to get the weeks available on hand field. Can someone tell me what I've done wrong?
Formula to get average sales quantity per week:
NVL((case when ({transaction.accounttype} = 'Income' AND {transaction.posting} = 'T') then {transaction.quantity} else 0 end),0)/12
Formula trying to get weeks available on hand:
{quantityavailable} / NVL((case when ({transaction.accounttype} = 'Income' AND {transaction.posting} = 'T') then {transaction.quantity} else 0 end),0) / 12
Thanks in advance.