Discussion Board for collaboration on QlikView Scripting.
can you tell me how can I divide with 2 tables ?
Cost, // here are amounts that costs with discount like: 550€ & -50€
Quantity, //here are all quantity like 25 and 25
Now I want to sum(cost)/sum(quantity).
Is it possible to use it in script?
Backend in expressions, it works.
Go to Solution.
You have to use group by
Group by //Include all columns other than cost and quantity
View solution in original post
Try like this
Load DocNo, ArtNo, Cost, Quantity, Cost/Quantity As Percentage From ... ;
You can do as below
Cost/Quantity as YourNewFieldName
SUM(Cost)/SUM(Quantity) as YourNewFieldName
Group By DocNo, ArtNo...
But the 1st Method is more efficient...