Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone and Happy new Year,
I'm having this problem that have never happened to me before and I find it quite weird.
Basically, the problem is:
I've 2 tables related by a LINK field:
Table A, fields: type_doc, date, ..., link.
total of rows: 10.160
Filtering by the field type_doc, choosing the value X,, total of rows returned= 3.078
Table B, fields: code, date, ..., link
total of rows: 3.884
Filtering by the field type_doc, choosing the value X,, total of rows returned= 145
When I unqualify other fields, as the year, month, day of the date, Provider, Enterprise and others (including Link) and do the same filter mentioned (type_doc= X):
Table A:
Filtering by the field type_doc, choosing the value X,, total of rows returned= 3.078 OK
Table B:
Filtering by the field type_doc, choosing the value X,, total of rows returned= 1
So, If I haven't filter by other dimension, just type_doc: why after "unqualifying", the number of rows returned in table B change??
What am I doing wrong? What's your recommendation?
Thxs in advance for your response, if there's something you dont understand feel free of asking.
Regards!
Leonor,
when you unqualify other fields (for example, Date), you make the two tables link based on multiple fields (I'm guessing QlikView is creating a synthetic key for you).
In the first scenario, when the two tables are linked only by the field Link, and you select type_doc = X, the count of associated rows in Table B reflects "the number of rows from Table B that have the same value of Link as the Table A rows where type_doc = X"
In the second scenario, when the two tables are linked by multiple keys (Link, Date, ...), the count reflects "the number of rows from Table B that have the same values of Link and Date and <any other key fields>.
Obviously, the second condition is much more strict, and therefore the count is lower.
You need to determine the right way of linking the two tables, from the business logic perspective, and qualify/unqualify your fields accordingly.
Hi Oleg! thxs for your response!!
Even though I thought I have the concept you mentioned pretty clear, I was unable to see it!! Layer 8 problem! :$
Thxs