Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
In my QVW''s I am having more number of synthetic keys.Though it is unavoidable in QV,I want to minimize number of synthetic keys in my application.Is there is any possible way available to reduce,let me know the same.
Thanks&Regards
Jai
I use the functions like Hash128.
Hash128(Field1, Field2) as Key
Make sure filednames are unique if you don't want QlikView to link on those fileds. Qlikview automatically join two tables on fields with identical (case sensitive!) filednames. Synthetic keys (in my experience) start happening when you have two or more tables that have a number of fields with identical names. QlikView then assumes you want to link those tables, and does so by creating synth keys. It is good practice to avoid this at all times, because it may also cause undesired effects in your analyses. another scenario is when you would like to have a union between tables, but the tables do not contain the same number of fields. QlikView then produces TableName;TableName_1 and a synthetic key (or -table) with all corresponding fields.
We usually use AutoNumber(field & field & ......,'ListName') as "keyname" to link tables, and avoid using identical fieldnames.
Success!
Hello,
When loading tables from any source, I'm using
Autonumber('TABLENAME ' & FieldName) AS QlikViewFieldName
so you can avoid generating same code from different fields witht the same value, and likewise using, if needed in your project, the string 'TABLENAME ' to identify where the field comes from easier in your script.
Hope this helps!
Miguel Angel
Give a look: http://michaelellerbeck.com/2008/08/22/qlikview-synthetic-keys/
But, I suggest to use functions like (autonumber, hash), how suggested for all.
Create a composite Key using the common fields in both the tables ... In my Example Month,State,Location,City is
common and I created them as Customer_Key(Composite Key name ) for my reference..
I think this may help you..