Discussion Board for collaboration related to Creating Analytics for QlikView.
I need to load a table but only the first record based on the date and time creation:
Key Date Creation
As you can notice for example the key 121856 shows different times in table but I want to load just the first 1 created (the line in red in the above table).
Go to Solution.
There might be numerous ways to do this, one of them would be to do a right join of the min Date Creation by Key to get only those rows where Date Creation is the minimum.
LOAD @1 as Key,
@2 as [Date Creation]
(html, codepage is 1252, no labels, table is @1);
Right Join (Table)
Min([Date Creation]) as [Date Creation]
Group By Key;
=FirstSortedValue(key, -[ Date Creation])
You can also try,
Date(Min(Date(Date#([Date Creation],'DD/MM/YYYY hh:mm'))),'DD/MM/YYYY hh:mm')
try with FirstValue() at script, like this?
FirstValue(Key) as Key,
FirstValue(DateTimeCreation) as TimeCreation
It works. I was having some difficulty to understand the concept but your explanation helped me a lot to understand how it works.
Thanks again and thanks to everyone for your help. :-)