Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
i have sample data like
ID,
Name,
Dat
Currently data shows 3 records with 2 same ID.
But i want to show updated data as per date update.
Output should be below screen-shot.
Thanks,
DJ
I assume you want the name for the maximum date as well as the date itself for the ID. Use a straight table:
Dimension: id
Expr1: FirstSortedValue(Name, -Dat)
Expr2: Max(Dat)
You mean, if duplicate Ids are there, it should take the one with latest date? If so, you can do it in the front-end easily like:
Straight table:
Dim1:Id
Dim2: Name
Exp: Max(Dat)
In the script like:
Load
Id,
Name,
Max(Dat) as Dat
From <> group by Id, Name;
Hi,
As see Name is different and ID is only same
A:
Load
Id,
Name,
Dat
From Table1 ;
B:
Load
Id,
Max(Dat) as Dat
From <> group by Id;
Now Join Table A and B based on Column ID and Dat and fetch all columns from table A.
Hi Tresesco,
Yes, Your understanding is right.
But when i excute this logic it will show all data.kindly check.
Still it shows the all records.
Thanks,
DJ
I assume you want the name for the maximum date as well as the date itself for the ID. Use a straight table:
Dimension: id
Expr1: FirstSortedValue(Name, -Dat)
Expr2: Max(Dat)
To do this in the load script:
LOAD id,
FirstSortedValue(Name, -Dat) As Name,
Max(Dat) As Dat
FROM ...
GROUP BY id;
I should have noticed the Name thing earlier. In that case, follow Jonathan's second suggestion below.
Hi.....
Please find the attachment below.
As said by Jonathan dienst it is correct.
Thanks