Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
Thank you very much Manish,
I had to adjust your solution in my Etl02, but with floor function I fixed ![]()
Thanks again!!!