Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

two linked fields

hello,

I've got a litle pb with two fields:

I had a circular reference so I copy out a dimension.

error loading image

My pb is that I want to compare my two fact tables when they have the same value for "Annee"..

how can i do : when I click on one of fields the other one is selecting if the value is the same ?

thanks

sorry for my english

17 Replies
IAMDV
Luminary Alumni
Luminary Alumni

QlikView solves the problem of circular references by defining a loosely coupled table. QlikView will attempt to make the longest table loosely coupled. To avoid ciruclar references and loosely coupled tables, you must rename the fields that causes the loops, or you can join the tables together into one table to solve the ciruclar reference.

In your case you can join the tables in the load script to fix the problem. Please post the QV document with sample data, incase you need help on doing this task.

Cheers!

Not applicable
Author

I load my dataset from a mysql DB.

So, in the script I have:

ODBC CONNECT TO mysql_local;

SQL SELECT *

FROM etl4.affiliation;

SQL SELECT *

FROM etl4.annee;

SQL SELECT *

FROM etl4.annee2;



SQL Select * .....

So I have to join the two tables in BOLD... What is the syntaxe?

pat_agen
Specialist
Specialist

hi,

qlikview will join tables if they have common field names. your nspahot in your firs tpost has the field Année 1 and Annee 2. These names are different so qlikview will not join them.

However you did say that you had a circular reference so "copied out a dimension". It is not clear from your second post what your original problem was. You also mention the requirement of joing two fact tables. Are thes the tables called etl4.annee and etl4.annee2?

If your fields have different names in your original source tables you can rename them as you load the data into qlikview.

Not applicable
Author

Thanks for your ideas but I'm not allowed to modify the names of tables in mysql.

In QV i d'ont know how to modify that..

there is no way to do : when i click on a field I do blablabl with a trigger for example?

IAMDV
Luminary Alumni
Luminary Alumni

You can rename the field names by using AS keyword. You don't have to change the DB schema.

OldFieldName AS NewFieldName,

Hope this helps!

Cheers

IAMDV
Luminary Alumni
Luminary Alumni

Please rename the fields in QV and not in DB.

Not applicable
Author

please can you tell me how to rename the field in QV??

Not applicable
Author

table_name:
load
old_name as new_name,
bad_name as good_name
from your_database

Not applicable
Author

i tried to rename the field in QV, the script works but it tells me that I have a circular reference...

becauses my two facts table are linked to same dimensions... I need to link the two fields but not into the script...

possible?