Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
darren_dixon
Contributor III
Contributor III

If two dates match

Hi,

Script:

[Table 1]:

Date(DateA) AS DateA,

Balance,

[Table 2]:

Date(DateB) AS DateB,

Target,

I'm trying to get a straight table which shows:

Date | Balance | Target

Thanks for your help,

Darren

4 Replies
hic
Former Employee
Former Employee

All you need to do is to name the two dates the same, e.g.

Date(DateA) AS Date,

Date(DateB) AS Date,

HIC

somenathroy
Creator III
Creator III

Hi,

If possible you can concatenate two tables like below:

Output:

LOAD

Date(DateA) AS Date,

Balance,

........

Concatenate(Output)

LOAD

Date(DateB) AS Date,

Target,

Then in a straight table add Date as dimesion and use Balance & Target in expression.

Regards,

Som

darren_dixon
Contributor III
Contributor III
Author

Ideally, I was hoping for an expression which may solve this.

I can't rename the fields to be the same as this would cause a loop

nagaiank
Specialist III
Specialist III

Try the following script:

TempOutput:

LOAD

Date(DateA) AS Date,

Balance,

........

Concatenate(Output)

LOAD

Date(DateB) AS Date,

Target,

Output:

NoConcatenate Load Date, Sum(Balance) as NewBalance, Sum(Target) as NewTarget

Resident TempOutput Group By Date;

Drop table TempOutput;