Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
lianelon
Contributor
Contributor

Adding a calculated field to an existing table

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

2 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

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.

sasiparupudi1
Master III
Master III

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