Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Concern,
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.
Regards
What does your data model look like? Is all the three fields in the same transaction table?
Example
Product, SalesQty, ReturnQty,Price
Books, 100,0, 10
Books, 200, 100, 10
Pencils, 1000, 10, 1
Pencils, 1000, 0, 1
I'm this scenario the sum of Price will become 20 for Books an 2 for Pencils.
Try this expression instead. Then you will calculate the right price per row.
Sum(SalesQty*Retail_Price) - Sum(ReturnQty*Retail_Price)
Sum(SalesQty*Retail_Price) - Sum(ReturnQty*Retail_Price)
is working. at last. thanks both of you guys
there is no way to calculate this in Qlik sense? I seen 48 people viewed but no one has the answer
Hi,
Please try the below.
(Sum(SalesQty) - Sum(ReturnQty)) * Sum(Retail_Price)
(Sum(SalesQty) - Sum(ReturnQty)) * Sum(Retail_Price)
i also though this was the solution
tried this but not giving correct result.
(Sum(SalesQty) - Sum(ReturnQty)) * Sum(Retail_Price)
i also though this was the solution
tried this but not giving correct result.
Hi Modara,
Please send the sample file & expected output.
Meanwhile, If all fields are in sample table, try like below
Sum((Sale Quantity - Return Quantity) * Retail Price)
What does your data model look like? Is all the three fields in the same transaction table?
Example
Product, SalesQty, ReturnQty,Price
Books, 100,0, 10
Books, 200, 100, 10
Pencils, 1000, 10, 1
Pencils, 1000, 0, 1
I'm this scenario the sum of Price will become 20 for Books an 2 for Pencils.
Try this expression instead. Then you will calculate the right price per row.
Sum(SalesQty*Retail_Price) - Sum(ReturnQty*Retail_Price)
all field are in same field and i tried your solution already but no luck. result gave a huge number which is totally incorrect
when i do sale quantity - return quantity this matches with power bi mean data model is ok but when i do (sale quantity - return quantity) * retail price then its not giving me correct
same data
(sale quantity - return quantity) * retail price
(2-0) * 234= so result should be 468and power bi shows me 468
doing this
Sum(SalesQty*Retail_Price) - Sum(ReturnQty*Retail_Price)
in Qlick sense it showing me 504
Sum((Sale Quantity - Return Quantity) * Retail Price)
in Qlick sense it showing me 504 same
*** I also tried
(SalesQty-ReturnQty)*Retail_Price---- and it give me 252 which is half of 504. so where is the issue? anyone has any idea?
Sum(SalesQty*Retail_Price) - Sum(ReturnQty*Retail_Price)
is working. at last. thanks both of you guys