Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gkcchowdary
Creator
Creator

how to multiply one field data into another field data?

Table1

Product,id,location,value

Apple,1,Hyderabad,10

LG,2,Bangalore,20.

Table2

Product,pincode,sales

Apple,523109,1000

LG,523107,2000

I want multiply first table value field into second table sales,

finally requir output

10*1000=10000

20*2000=20000, how

5 Replies
ogster1974
Partner - Master II
Partner - Master II

If load your tables Qlik Sense data model will automatically join on your Product so:

AGGR(SUM(value)*SUM(sales), Product) will output what you need.

Or

You could also use a table chart and add Product as a dimension and =SUM(value)*SUM(sales) as a Measure to produce what you need.

Regards

Andy

jonathandienst
Partner - Champion III
Partner - Champion III

I think you actually need something slightly different:

     in a chart/table with product as a dimension:   Sum(value * sales) as a measure

     or,                Sum(Aggr(value * sales, Product))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sasiparupudi1
Master III
Master III

Untitled2.jpgPlease see attached

alibd225
Creator
Creator

you can use Mapping table command in load script

SalesValue:

Mapping LOAD Productid,

    sales;

SQL SELECT *

FROM Table2;

SalesDetails:

LOAD

Productid,

location,

ApplyMap('SalesValue',Productid,0)*value as TotalSales

SQL SELECT *

FROM Table1;

or use Sum(value * sales) in expression in design mode

jagan
Luminary Alumni
Luminary Alumni

Just simply use

SUm(value * sales)

Regards,

Jagan.