Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show last update for every day

Hi guys, need some help..

I have something like that :

country         type           insert date                       last update

country 1       type 1       2013-06-24 12:00:45        2013-06-26 13:20:45

country 1      type 1       2013-06-24 17:00:45         2013-06-26 13:40:45

country 1      type 2       2013-06-24 12:00:45         2013-06-26 13:20:45

country 1      type 2       2013-06-24 12:00:45         2013-06-26 13:40:45

country 1      type 2       2013-06-25 17:00:45         2013-06-26 13:20:45

I want something like that:

country1  type1  2013-06-24 17:00:45    2013-06-26 13:40:45

country1  type2  2013-06-24 12:00:45    2013-06-26 13:40:45

country1  type2  2013-06-25 17:00:45    2013-06-26 13:20:45

So, for every couple country-type i would to see all distinct days, but with only the last update.

Any suggestions?

Thanks!

Antonio

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Use below script...

Load *, Date(Floor([insert date])) as Date  Inline

[

  country,         type,           insert date,                       last update

  country 1,      type 1,       2013-06-24 12:00:45,        2013-06-26 13:20:45

  country 1,      type 1,       2013-06-24 17:00:45,         2013-06-26 13:40:45

  country 1,      type 2,       2013-06-24 12:00:45,         2013-06-26 13:20:45

  country 1,      type 2,       2013-06-24 12:00:45,         2013-06-26 13:40:45

  country 1,      type 2,      2013-06-25 17:00:45,        2013-06-26 13:20:45

];

Create a straight table

Dimension

Country

Type

Date

Expression

Max([last update])

Go to Presentation tab

Select Date

Hide Column

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Use below script...

Load *, Date(Floor([insert date])) as Date  Inline

[

  country,         type,           insert date,                       last update

  country 1,      type 1,       2013-06-24 12:00:45,        2013-06-26 13:20:45

  country 1,      type 1,       2013-06-24 17:00:45,         2013-06-26 13:40:45

  country 1,      type 2,       2013-06-24 12:00:45,         2013-06-26 13:20:45

  country 1,      type 2,       2013-06-24 12:00:45,         2013-06-26 13:40:45

  country 1,      type 2,      2013-06-25 17:00:45,        2013-06-26 13:20:45

];

Create a straight table

Dimension

Country

Type

Date

Expression

Max([last update])

Go to Presentation tab

Select Date

Hide Column

Not applicable
Author

Thank you very much Manish,

I had to adjust your solution in my Etl02, but with floor function I fixed

Thanks again!!!