Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI!
I'm new on QV and trying to add a sales revenue List box.
The sales revenue is a sum of salesprice in products table and quantity in sales table.
I figured I can add to the sales table a sales revenue field. in the script but I don't know how to do that.
I'll appreciate any help on the subject:)
Thank you in advance
In script or in the UI?
If you have correctly loaded all tables, then the UI step is probably easiest. Create a straight table and add Product ID as dimension. Then add and expression like:
= Salesprice * Sum(Quantity)
Even though these fields are in different tables, QlikView will perform the necessary Joins on the fly and calculate the aggregated total.
Use mapping table in the script
Map_saleprice:
Mapping Load
Productid,
Saleprice
From products;
Sale:
Load
Applymap ('Map_saleprice',productId)*quantity as salerevenu,
Field2,
Field3
From sales;
Hth
Sasi