Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
billuran
Partner - Creator
Partner - Creator

Joining two tables

Hello, I ave joining problem, I have two tables as stated below example:

Table 1: Data Table

DeptAmountPay Period
AA

5

Date1
AA4Date2
AA4Date2
BB3Date1
BB4Date2

Table 2: Target Table

DeptTargetPay Period
AAYYYDate1
AAYYYDate2
AAYYYDate3
AAZZZDate1
AAZZZDate2

I need to associate each target with the above table, based on dept and PayPeriod.

I want o to be able always want to see the amount no matter what the target selected.

Here is is the structure i want: Would like 45 to populated all the way down, this is where i am struggling.

qlikehelp.PNG

3 Replies
aarkay29
Specialist
Specialist

Try

sum(Total<Dept>Amount) as Expression

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Bill,

Join Both Tables With the help of Key like below:

DEPT&'-'&[PAY PERIOD] as %KEY

And remove those field from second table

Thanks,

Arvind Patil

Kushal_Chawda

see this

Don't join - use Applymap instead

TargetMap:

mapping LOAD

          Dept&[Pay Period] as Key,

          Target

FROM table2;


Table1:

LOAD Dept,

          Amount,

          [Pay Period],

          applymap('TargetMap',Dept&[Pay Period],0) as Target

FROM table1;