Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I want to connect a Date field to my source table ,Where Date Table column will have one and my source table column will have many,Can anyone let me know how can i create a Association,
Thanks,
You'd just need a primary key to connect to your dates in source table.
Maybe DateID?
trim(date(YourDateFieldhere,'YYYYMMDD')) | as [DateID], |
You can use the above code in both your Date Field Table and Source Table.
Check your Date Format (YYYYMMDD) it might be different in your script.
You'd just need a primary key to connect to your dates in source table.
Maybe DateID?
trim(date(YourDateFieldhere,'YYYYMMDD')) | as [DateID], |
You can use the above code in both your Date Field Table and Source Table.
Check your Date Format (YYYYMMDD) it might be different in your script.
You can use number part of date
Num(Date) as DateID
Hi
To create association between fields (ono to one, one to many, many to one whatever.....) just alias both fields with the same name. Qlik automaticly will associate it based on name (that is how qlikveiw / qliksense works)
Also as other mentioned above make sure you provide the same format for both fields (it is best practice if you associate numbers with numbers, text with text, dates with dates etc)
As there are not datatypes in Qlik engine it might be sometimes confusing. Have a read here about it:
kind regards
Lech
Thanks All ,
It worked fine after formatting the dates in both tables,
Hi
Please mark CORRECT answers so we can close topic and move on.
regards
Lech
Create a DateFlag and load all the dates in same field, something like this
LOAD
*,
CreateDate as Date,
'Create' as DateFlag
Resident TableName;
Concatenate
LOAD
*,
ModifiedDate as Date,
'Modified' as DateFlag
Resident TableName;