Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to obtain the latest date ([Dateur JT -etjt]) according to some conditions on other varaibles ([Etape -etjt]=alfa,beta [Typ attribution-etjt] = gamma). Result should be grouped by the key of the dataset --> [No interne tpg -JT]. it means that I am looking for the latest date for each value of [No interne tpg -JT].
Table:
[No interne tpg -JT],
[Etape -etjt],
[Typ attribution-etjt],
[Dateur JT -etjt],
[Id attribution-etjt]
Anyone can help?
Thanks
Giovanna
Try this:
LOAD
[No interne tpg -JT],
max([Dateur JT -etjt]) as LatestDate
FROM Table
WHERE match([Etape -etjt].'alfa,'beta')
AND [Typ attribution-etjt] = gamma)
GROUP BY [No interne tpg -JT];
Try this:
LOAD
[No interne tpg -JT],
max([Dateur JT -etjt]) as LatestDate
FROM Table
WHERE match([Etape -etjt].'alfa,'beta')
AND [Typ attribution-etjt] = gamma)
GROUP BY [No interne tpg -JT];
yes it works! I have found another solution very similar to this but this is more concise, thanks a lot!
Hi,
Try following script -
Table1:
Load
[No interne tpg -JT],
Max([Dateur JT -etjt]) as MaxDate
From Tablename
Where
Wildmatch([Etape -etjt],'alfa','beta') and Wildmatch( [Typ attribution-etjt], 'gamma');