Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to solve a problem. I have the following table.
Now, I would like to have only distinct serialnumbers with max date associated with them like shown below:
Any help is appreciated.
Thank you,
Parth
in script
SET DateFormat='M/D/YYYY';
a:
load * inline [
SerialNumber, Date
abcd,6/5/2014
efgh,7/15/2015
xyz,3/2/2013
pqr,4/16/2015
abcd,9/2/2015
xyz,5/15/2015
pqr,9/3/2015
];
inner Join (a)
load
SerialNumber, date(max(Date)) as Date
Resident a
Group By SerialNumber;
or if you want in chart
dimension SerialNumber
expression max(Date)
in script
SET DateFormat='M/D/YYYY';
a:
load * inline [
SerialNumber, Date
abcd,6/5/2014
efgh,7/15/2015
xyz,3/2/2013
pqr,4/16/2015
abcd,9/2/2015
xyz,5/15/2015
pqr,9/3/2015
];
inner Join (a)
load
SerialNumber, date(max(Date)) as Date
Resident a
Group By SerialNumber;
or if you want in chart
dimension SerialNumber
expression max(Date)
Thank you very much Massimo. This helped me.
Have a good one
Regards,
Parth