Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

How to differentiate data field after linking?

Hi All,

I am having a problem in differentiating the data field after linking. I have a master table which contain information about employees. There are few tables that are attached to this table based on the Employee ID.

Now my problem is I need to draw a chart taking my dimension value from master table and counting EMPLID from a specific table. But all the tables have EMPLID as there linking criteria. How would QV chart differentitate what EMPLID values i need to count, it may be counting total EMPLID from table 1 attached to master table or from table 2 .

I can't use a Qualify statement to differentiate between EMPLID of different tables coz that is my linking field, through which it is linked to master table.

So, what is a way to differentiate from which table we need to count the EMPLID. thanks.

Any help will be appreciated . It's Urgent.

1 Solution

Accepted Solutions
MVP
MVP

How to differentiate data field after linking?

Add a separate copy of the EMPLID under a different name to the table you want to count from, and count the copy.  Alternatively, if you just need a count of matching rows on the other table, count any field in that table that is NOT a key field.

6 Replies
MVP
MVP

How to differentiate data field after linking?

Add a separate copy of the EMPLID under a different name to the table you want to count from, and count the copy.  Alternatively, if you just need a count of matching rows on the other table, count any field in that table that is NOT a key field.

Not applicable

How to differentiate data field after linking?

Thanks for replying John. So you mean adding a load statement above select and then writing

Load EMPLID as Table1EMPLID;

Will this work?

MVP
MVP

Re: How to differentiate data field after linking?

If you're loading the table by just using a select, you'd need to do LOAD *,EMPLID as Table1EMPLID;, but yes.  Then you can just count(Table1EMPLID) or count(distinct Table1EMPLID) depending on what you need.  But you still have the EMPLID field in the table to handle your linkage duties.  Compression should keep the new field from taking much space at all, though I haven't verified that.

Not applicable

How to differentiate data field after linking?

I'm sorry John, but I didn't get what you mean by this:

" Compression should keep the new field from taking much space at all, though I haven't verified that."

??

Thanks for replying.

MVP
MVP

How to differentiate data field after linking?

If you have 1 billion rows in Table 1, you might think that adding a 10-byte ID would take 10 GB of memory.  However, QlikView compresses your data to take less space.  Two columns with identical values are easily compressed to not much more space than a single column.  Therefore, adding Table1EMPLID should not cause any memory problems, no matter how large Table 1 is.

So the new field will not take much memory.  That's all I was saying.

Not applicable

How to differentiate data field after linking?

Ok got it. Thanks a lot John. Appreciate your help.

Community Browser