I have an 'Order Details' table presented below. I would like to calculate the gross sales, which is the [UnitPrice]*[Quantity]. However, one 'OrderID' consists of multiple order lines called 'LineNo'. What expression can I use to make sure that it multiplies in a specific order?
The expression 'Sum(total Quantity)*Sum(total UnitPrice)' does not work as it first sums up the Quantity and UnitPrice and afterwards it multiplies. I need an expression that multiplies first and adds up next.