Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik Users,
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?
For example:
For OrderID (10248)
Gross Sales = (14,04*10) + (12,71*5) + (28,62*12) = 547.39
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.
Thanks in advance!