Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm a beginner to qlikview. Have loaded three xlsx file in QVW document, all the three xlsx file have one common field.
However, it is not seen as Primary key. Also, in the Table viewer, fields like '$Syn1', '$Syn3' are showing
How to remove this 'Syn' field and how to make the common field as primary key
In Qlik, there is no such thing as a "primary key". There are fields and they are related. There is no technical need for something called "primary key".
A relation between two tables is only allowed to be based on one field. If not, Qlik will make Syn(thetic) keys to fix this problem.
Thanks for the update. The data is for two period and it is coming in two separate rows. I need it in a single row for each unique entity e.g. entity ABC should be in one for Period 1 and Period 2. Right now it is coming as ABC Period 1 in first row and ABC Period 2 in second row.
Depending on your data it would probably be best to either join or concatenate 2 of the tables in order to remove the synthetic keys.
Qlikview joins the table on the basis of column name. Synthetic keys are created when two or more table have more than one common column name. It slow down the performance of application.
How to Removed Synthetic keys:
- Renaming a fileds use( As) ex: Customer as %Customer
-comment out unneccesary fields ex: // Customer,
-Concatenating fields to create single composite key.
What you can do is give each table their own table1ID, table2ID, TableNID.
you can do this by adding this to the script '1' as Table1ID or something similar.
Then you create a fact table which connects all the tables together.
more info can be found here:
Qlik Tips: Rules for creating a Key/Link Table in QlikView
and here
Hi
You can remove syn keys with renaming field name or if it is not required comment those fields
Hope it helps
Thanks, how do I do this.
Also, I have posted one more query, how to show records in single row for same entity if the data is for two period
By which field you want to link all excel sheets, make sure that field name must be same in all load.
If you share sample data than things can be clear more.
Hi,
Check if the common field has the EXACT same name (no spaces etc.) in your spreadsheet. If not, rename the fields in your load script.
This will prevent QV from creating synthetic keys like '$Syn1'.
Regards.