I think below script joins the Login and Calendar field with the common field 'LoginDate' between this two tables. Please correct me if I am wrong!
Login: Load LoginDate, UserID, Application,'1' as Remark Resident Login1; Calendar: JOIN(Login) LOAD LoginDate, Year, Quarter, Month, Week Resident table;
Yes, the field with some nema are the keys between tables.
If you have a compost key, you need to concatenate two or N filed in just a field.
Load LoginDate & UserID AS PK
,'1' as Remark
LOAD LoginDate & UserID AS PK
If you not indicate INNER before JOIN see in your example:
The script assume the sintaxe OUTER.
OUTER JOIN (Login) = JOIN (Login)
From what I can see you do not need to join and your original script will 'associate' the two LoginDate fields as they have the same name. This should then behave as you want it to. Check the Table Viewer (Ctrl+T) to see if the association has been succesful (names need to be identical, case and all).
If all the calendar fields can be derived from the date you are better off working them out and not having a join at all, thusly:
date(LoginDate, 'DD MMM YYYY') as LoginDate,
Year(LoginDate) as Year,
'Q' & (ceil(Month(Date) / 3)) as Quarter,
Month(LoginDate) as Month,
week(LoginDate) as Week,
date(monthstart(Date), 'MMM-YY') as [Month Year],
'1' as Remark
This should be much more effiecient - particularly when you get up to larger data volumes. The script assumes that the field LoginDate is a valid date field - otherwise you will need to nest a Date# function to convert it first.