Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can someone tell me what I am doing wrong here? I simply want to subtract two figures and then divide them to find our profit per job.
I have our overall profit by using the expression:
Sum([Earnings])-Sum([Expenses])
I have the total number of jobs by using the expression:
Count([JobNumber])
I would have thought then to find the profit per job the expression would be:
Sum([Earnings])-Sum([Expenses])/Count([JobNumber])
As an example: our Expenses are $1,000. Our Earnings are $3,000. Profit is $2,000. We completed 100 Jobs. Therefore profit per job should be $20. Using the above formula I get an amount 10 times this.
Math was never my strength.... what am I doing wrong here?
Maye be jus add ()
(Sum([Earnings])-Sum([Expenses]))/Count([JobNumber])
Maye be jus add ()
(Sum([Earnings])-Sum([Expenses]))/Count([JobNumber])
@Taoufiq_Zarra Thankyou! BODMAS, of course. I suspected this, but I couldn't figure out where to put the brackets. Really appreciate your help.
I want to do very simple calculation as measure or expression in qlik sense
I want to do following
(Column A - Column B)* Column C
(Sale Quantity - Return Quantity) * Retail Price
I want it as function or expression or in measure. I don't want to do in Load.
I follow your instruction and can able to do
sum(Sale Quantity)-Sum(Return Quantity)
but when I
(sum(Sale Quantity)-Sum(Return Quantity)) * sum( Retail Price)
it gives me wrong result
please help
Hi Modara,
Maths was never my strong suit so I am really not sure, but given you are multiplying rather than dividing you may need to put the brackets around the 2nd part of the equation.
Try posting a question separately and someone smarter than me will be able to offer advice I am sure.