Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script input of two datasets with the same field names

Hi all,

I'm trying to input two datasets with the same field names into a qvw file. The field names of them are the same but some of the data are different. I need to input both of them to do some expression calculations to create charts but I failed to do so. Could anyone give any suggestions on how to achieve this, please?

Many thanks,

Grace

6 Replies
ajaykumar1
Creator III
Creator III

Hi,

select * from qvd1;

concatenate

select * from qvd2;

The qvd2 data of the fields will concatenate with the fields data of qvd1.

Thanks,

Ajay

israrkhan
Specialist II
Specialist II

You can concatenate both data sources in to one qvd, and than you can do the calculations simply...

and you can differentiate them, that which value coming from which data source, by loading like below...

load 'Source1' as Source, *

from Source1;

where condition ...

load 'Source2' as Source, *

from Source2;

where condition ...

you dont nee to use concateneate keyword, because you said your fields name are same, it will be concatenated automatically, and you can use  the source field to know ,which value is coming from which source,....

Hope it helps...

MarcoWedel

please specifiy your requirements with some sample data / table structure.

If you have identical fieldnames containing different data, then concatenation might not make any sense. Instead you could rename the fields using the "as" statement during load or with "rename field(s)" after loading the first table.

Dependent of your data and requirements you would create a data model e.g. with associated fields or combination of your two tables into one (using joins).

So it all depends on your data and requirements

regards

Marco

Not applicable
Author

Hi Israr,

Thank you very much for your reply. May I ask you another quick question, please? If I applied CrossTable to a dataset by:

DevelopmentTable:

CrossTable(DevelopmentQuarter, DevelopmentP)

Load ......

from

And then I loaded a second set of data into Qlikview, if I'm now going to right join them, which data name of the DevelopmentTable should I use, please?

right join

Load UWYear,

    
DevelopmentQuarter,

    
DevelopmentP

From DevelopmentTable; 

is incorrect?

Not applicable
Author

Hi Marco,

I have, say 50 fields of the two datasets with exactly the same data but 10 fields of completely different data. The difficulty is that I have to CrossTable the final 10 fields first and then do qlikview calculations of the first set of 10 fields divided by the second set of 10 fields. The reason that I cannot do calculations of each cell in Excel is that if so, I won't be able to apply filters, which are the previous 50 fields.

Do you know how to resolve this, please?

Many thanks,

Grace

israrkhan
Specialist II
Specialist II

Yes it is,  But can you please share a sample document..

would be easy to Help you.....