Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to get Max date for Two straight table

Hi All ,

I have data like below

STRAIGHT TABLE 1 :

DATEPRODUCT
4/25/2017 9:13:30 PMA
4/25/2017 9:12:11 PMA
4/25/2017 9:12:30 PMA
4/25/2017 9:11:29 PMA
4/25/2017 9:11:45 PMA
4/25/2017 9:12:46 PMA
4/25/2017 9:13:06 PMA

   STRAIGHT TABLE 2:

DATEPRODUCT
4/18/2017 11:02:31 AMB
4/18/2017 11:00:54 AMB
4/18/2017 11:01:22 AMB
4/18/2017 11:02:01 AMB
4/18/2017 11:00:12 AMB
4/18/2017 11:00:28 AMB
4/18/2017 10:58:52 AMB
4/18/2017 10:59:52 AMB
4/18/2017 11:01:35 AMB
4/18/2017 11:02:18 AMB
4/12/2017 9:57:03 PMB
4/12/2017 9:51:51 PMB

here I want to fetch Max Date  from both tables individually , Now I am able to get get for one table only i.e 4/25/2017 9:13:30 PM

i need second straight table max date also i.e  4/18/2017 11:02:31 AM Finally want to display both tables max dates  along with Product Names  separately

Regards,

5 Replies
sunny_talwar

What are the expressions in your two straight table?

sunny_talwar

May be like this

Max({<PRODUCT = {A}>}DATE)

Max({<PRODUCT = {B}>}DATE)

Anonymous
Not applicable
Author

Hi Sunny

just trying with dummy expression

Here need to display only one max date

Regards,

sunny_talwar

Not sure I understand

ziadm
Specialist
Specialist

TABLE1:

load * inline [

MyDate, PRODUCT

4/25/2017 9:13:30 PM, A

4/25/2017 9:12:11 PM, A

4/25/2017 9:12:30 PM, B

4/25/2017 9:11:29 PM, B

4/25/2017 9:11:45 PM, B

4/25/2017 9:12:46 PM, B

4/25/2017 9:13:06 PM, B

];

MinMax:

load

PRODUCT,

num(Max(MyDate)) as  MaxDate,

num(Min(MyDate)) as  MinDate

Resident TABLE1

Group by PRODUCT;

Same thing for TABLE2 and concatenate both