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

Restrict the dates in load script

Hi All,

Could someone help me to display only the

A:

ID, DATE, MESSAGE

1,10/11/2012 12:00:56, YES

1,10/11/2012 12:04:43, NO

1,10/11/2012 13:10:02,YES

2,113/11/2012 13:11:02,YES

2,11/11/2012 13:15:02,YES

2,12/11/2012 14:20:02,YES


And I want to create something like this:

ID, DATE, MESSAGE

1, 10/11/2012 13:10:02, YES,

2, 12/11/2012 14:20:02, YES

I need only the last time when ticket was updated to be displayed in a streight table.

I tried to use the Max(DATE) in the chart to sort them but I want to restrict the data from the load script. Any advises?

Thansk in advance!

C

1 Solution

Accepted Solutions
jpenuliar
Partner - Specialist III
Partner - Specialist III

A:

LOAD * Inline

[

ID, DATE, MESSAGE

1,10/11/2012 12:00:56, YES

1,10/11/2012 12:04:43, NO

1,10/11/2012 13:10:02,YES

2,13/11/2012 13:11:02,YES

2,11/11/2012 13:15:02,YES

2,12/11/2012 14:20:02,YES

];

FirstSortedValue:

LOAD ID,

FirstSortedValue(DATE, -DATE) as Date,

FirstSortedValue(MESSAGE, -DATE) as Message Resident A Group By ID;

View solution in original post

3 Replies
sunny_talwar

May be this

Fact:

LOAD ID,

     DATE,

     MESSAGE

FROM ....

Right Join (Fact)

LOAD ID,

     Max(DATE) as DATE

Resident Fact

Group By ID;

jpenuliar
Partner - Specialist III
Partner - Specialist III

A:

LOAD * Inline

[

ID, DATE, MESSAGE

1,10/11/2012 12:00:56, YES

1,10/11/2012 12:04:43, NO

1,10/11/2012 13:10:02,YES

2,13/11/2012 13:11:02,YES

2,11/11/2012 13:15:02,YES

2,12/11/2012 14:20:02,YES

];

FirstSortedValue:

LOAD ID,

FirstSortedValue(DATE, -DATE) as Date,

FirstSortedValue(MESSAGE, -DATE) as Message Resident A Group By ID;

0li5a3a
Creator III
Creator III
Author

Thanks for it, works now using this