Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to remove the synthetic key using Autonumber function..I have created Autonumber key in two tables using three columns Fox Ex- Autonumber(Date&'-'&X&'-'Y) as key..Two tables are connected through the key column but it is generating different keys for same value.Am I doing anything wrong here?
make sure your date field doesnt have any time values.
i dont see any other issues.
can you share some sample data
I have used date(datefield,'YYYY-MM-DD').
For first table say
Table x:
Autonumber(Date&x&Y)--> key generates values from '1' to '6588'
for second table
Table y:
Autonumber(Date&x&Y)--> key generates values from '6589' to '1100000'
try flooring datefield
date(floor(datefield),'YYYY-MM-DD')
You need to use a parameter in the AutoNumber Function to let Qlik Sense know you are wanting to use the same AutoNumber 'Set' for each table loaded.
AutoNumber(Date & '-' & X & '-' Y, 'a') as KeyField
The letter 'a' can be anything you want it to be as long as you use the same parameter is all load statements.
TableA:
Load
AutoNumber(Field1 & Field2 & Field3, 'a') as KeyField
From SourceA;
TableB:
Load
AutoNumber(Field4 & Field5 & Field6, 'a') as KeyField
From SourceB;
It dint work..
Does it work if you don't use the AutoNumber function?
i.e.
TableA:
Load
Field1 & FIeld2 & Field3 as KeyField
From SourceA;
TableB:
Load
Field4 & Field5 & Field6 as KeyFIeld
From SourceB;
I have used AutoNumber(Date & '-' & X & '-' Y, 'a') as KeyField but still, it generates different numbers because of that table join doesn't happen
What does X and Y represent?
Do you have an exact example of the script for this Load Statement?
It worked. Thanks for all your response
I used Autonumber(Date(Date,'ÝYYY-MM-DD'& X&Y) as key