I have this formula below and it works fine in 98% of cases.
However, some orders have type = return, which makes the quantity = 2 so it divides the fixed fee by two. How can I exclude type = "Refund" in this formula?
{Fixed [Order Id]:sum([Fixed Fee])/sum([Quantity])}
hi Alex,
You should be able to do this by nesting a logic statement within the Sum of Quantity aggregate like this
{Fixed [Order Id]:sum([Fixed Fee])/sum(IIF([Type] != 'Refund','[Quantity],null))}
Hope that helps
Retrieving data ...