I am trying to create an additional field (through my load script) called "Latest Date", which gives me the max LoginDate for each ID. So if max LoginDate for ID 2168 is 14-02-2017, then this date should appear in every row where ID = 2168.
How can I achieve this?
Thanks in advance!
May be this
Left Join (Fact)
Max(Date) as [Latest Date]
Group By ID;
May be this?
Left join to fact
Load *, Max(Date) as MaxDate
Group By <Non Aggr Dimensions>;
Here i need to ask if you have LoginDate in your table it self then try with
DATE(MAX(LoginDate)) as MaxLoginDate
Thanks guys! All three answers were very helpful
In the end Anand came closest to the solution which I could use directly in my code, so I will mark his answer as correct.
Retrieving data ...