Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Multiplication fields from different tables ApplyMap

Hell All,

I am new to Qlik.

I have two tables similar to the following

Capture.PNG

I want a new field on Table1, NewField = DP (Table1)* DEM(Table2)

How can I achieve that

2 Solutions

Accepted Solutions
Highlighted
Partner
Partner

Hey,

 

Here is the general concept for how to achieve this:
1) Join tables

2) Resident load and multiply the two fields

 

Working script:

TestData:
Load * INLINE [
SEG, Year, DP
XY,2020,0.1
XY,2021,1.1
XY,2022,2.1
AA,2020,3.1
AA,2021,4.1
AA,2022,5.1
TT,2020,6.1
TT,2021,7.1
TT,2022,8.1
];

LEFT JOIN(TestData)
Load * INLINE [
SEG, Year, DEM
XY,2020,0.1
XY,2021,1.1
XY,2022,2.1
AA,2020,3.1
AA,2021,4.1
AA,2022,5.1
TT,2020,6.1
TT,2021,7.1
TT,2022,8.1
];

Table1:
NoConcatenate
LOAD
	SEG
, Year
, DP
, DEM
, DP*DEM as NewField
RESIDENT TestData
;

View solution in original post

Digital Support
Digital Support

Did Stoyan's post get you what you needed?  If so, do not forget to return to the thread and use the Accept as Solution button on his post to mark things and give him credit for the assistance as well as let other Community Members know things worked.  If you are still needing help, please leave a new update.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

View solution in original post

2 Replies
Highlighted
Partner
Partner

Hey,

 

Here is the general concept for how to achieve this:
1) Join tables

2) Resident load and multiply the two fields

 

Working script:

TestData:
Load * INLINE [
SEG, Year, DP
XY,2020,0.1
XY,2021,1.1
XY,2022,2.1
AA,2020,3.1
AA,2021,4.1
AA,2022,5.1
TT,2020,6.1
TT,2021,7.1
TT,2022,8.1
];

LEFT JOIN(TestData)
Load * INLINE [
SEG, Year, DEM
XY,2020,0.1
XY,2021,1.1
XY,2022,2.1
AA,2020,3.1
AA,2021,4.1
AA,2022,5.1
TT,2020,6.1
TT,2021,7.1
TT,2022,8.1
];

Table1:
NoConcatenate
LOAD
	SEG
, Year
, DP
, DEM
, DP*DEM as NewField
RESIDENT TestData
;

View solution in original post

Digital Support
Digital Support

Did Stoyan's post get you what you needed?  If so, do not forget to return to the thread and use the Accept as Solution button on his post to mark things and give him credit for the assistance as well as let other Community Members know things worked.  If you are still needing help, please leave a new update.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

View solution in original post