Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why QV adds data from other tables when I just want to display one Table?

Hi, I have some question regarding QV. Not sure how to put it so I will just ask by giving example.

I load such script:

Table1:
load
     *
Inline [
     FieldA, FieldB, FieldC
     1,1,1
     2,2,2
     3,3,3
]
;

Table2:
load
     *
Inline [
     FieldA, FieldD, FieldE
     2,2,2
     3,3,3
     4,4,4
]
;

After loading such two tables I try to display Table1 in Table box why do I get as a result row from second table added? Is there a way to do that differently?

Table1:

FieldA

FieldB

FieldC

1

1

1

2

2

2

3

3

3

4

-

-

Regards,
Mat

8 Replies
rubenmarin

Hi Mat, you can add the 'NoConcatenate' clause tio avoid autoconcatenation:

Table1:
load
      *
Inline [
      FieldA, FieldB, FieldC
      1,1,1
      2,2,2
      3,3,3
]
;

Table2:

NoConcatenate load
      *
Inline [
      FieldA, FieldD, FieldE
      2,2,2
      3,3,3
      4,4,4
]
;

vinay_hg
Creator III
Creator III

as the field name is of 1st column is same in the both the tables, it create a synthetic key due to join u r getting this result. change the 1st column name of either one tabl, i mean use alias it ll work

Not applicable
Author

Thanks Ruben but I do not think that is the case here. Autoconcatenation is done when all field titles are the same. Here the tables have common key. When I add noconcatenate it is the same.

Clever_Anjos
Employee
Employee

Go to your table properties

At presentation level, tick 'Omit Rows when Field is NULL' for FieldB and FieldC

Capturar.PNG

vinafidalgo
Partner - Creator
Partner - Creator

You can use the NoConcatenate option, also take a look at "Supress null values".

Not applicable
Author

You could use:

     Qualify FieldA;

In this way it will automatic change the name adding the name of the table in front, eg: Table2.FieldA, and you will have unique fields and the problem will disappear.

rubenmarin

You're right, has nothing to do with concatenate, I gave a quick answer and was wrong. It's because '4' is also a value of FieldA.

You can follow the answers from Vinaykumar or Clever, also if from some reason you want to have values from tables separated you can add a field to use as link, ie. IdFieldA, and set a different name for FieldA in each table.

Just take care because this way selections can be made in Table1.FieldA, Table2.FieldA or IdFieldA

Colin-Albert

The two tables you have loaded are associated because the name FieldA is common to both tables.

After making changes to your load script and loading data, always check the table Viewer (Ctrl-T) to see what the links are between the tables.

These associations are fundamental to the way QlikView links data.