Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello i've used this istruction to load some data in qlikview:
COUNTRIES:
LOAD Country,
Capital,
[Area(km.sq)],
Round(Num#(Trim([Population(mio)]))) as Population,
[Pop. Growth],
Currency,
Inflation,
[Official name of Country]
FROM
$(m_oszSourcesFile)Country1.csv
(txt, codepage is 1252, embedded labels, delimiter is ',');
COUNTRIES:
Concatenate(COUNTRIES)
LOAD Country,
Capital,
[Area(km.sq)],
Round(Num#(Trim([Population(mio)]))) as Population,
[Pop. Growth],
Currency,
Inflation,
[Official name of Country]
FROM
$(m_oszSourcesFile)Country2.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
COUNTRIES:
Concatenate(COUNTRIES)
LOAD Country,
Capital,
[Area(km.sq)],
Round(Num#(Trim([Population(mio)]))) as Population,
[Pop. Growth],
Currency,
Inflation,
[Official name of Country]
FROM
$(m_oszSourcesFile)Country3.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
I need to load the data of three different csv in a single table.
The loading process works but there are 2 data duplicated in the table generated and using the count function to get the total number of rows it returns a number that is the effective total of rows plus 5 elements (2 element is ok but the other three?).
I have manually checked the data.
The csv are comma separated data.
Have i made some mistakes in the load script?
Thanks!
Marco
Marco,
I can't see anything wrong with your code at the moment.
Any chance that you upload your csv files (or part of the files that demonstrate your issue) here to the forum (use advanced editor or edit your first posting to be able to upload files).
These are the files i have loaded.
Thanks you.
Marco
Ok, I get 197 rows loaded into my data model.
Which ones are the assumingly duplicated?
Haiti and Ivory Coast are the two cities duplicated.
So my load procedure is correct and generate one table with all the three csv data?
Marco
I just can't see any problems.
I've attached the application. Please check.
I can't understand how can be possible, because i've read that Qlikview's strongness is associative technology.
So duplicate data that are key field should be present once time.
Isn't it?
How can i solve this problem?
Thank you.
Marco
I can't understand how can be possible, because i've read that Qlikview's strongness is associative technology.
So duplicate data that are key field should be present once time.
Marco,
I am sorry, I just don't get your point.
I don't see any duplicate data, Haiti and Ivory Coast are not duplicated as far as I see (frequency = 1).
All records are loaded into one single table, so there is not key involved. Are you using a more complex data model?
Then you need to post more details.
Hi,
Since all your fields are the same, you can load everything in 1 single statement and everything will be concatenated automatically:
COUNTRIES:
LOAD Country,
Capital,
[Area(km.sq)],
Round(Num#(Trim([Population(mio)]))) as Population,
[Pop. Growth],
Currency,
Inflation,
[Official name of Country]
FROM
$(m_oszSourcesFile)Country*.csv
(txt, codepage is 1252, embedded labels, delimiter is ',');
Basically instead of Country1, Country2 and Country3 use "Country*".
Well, i have simply loaded data in a single table with the attached results.
Marco