Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenate inline

Hi,I had a QVD created and i concatenated new inline table.Can someone please tell me how to modify previously loaded inline table?and i can see  Employee field added to my first table "filename".i meant to create another table actually. when exactly should i use Resident load?

Directory;

CrossTable(EmployeeName, Data)

LOAD EmpID,

     EmployeeName

FROM (qvd);

Concatenate

LOAD * INLINE

[Employee, EmpID

    Rohit S,1

    David S,2

    Sahil,3

    Pravesh P,10

    Rahul S,20

    Monica N,11

    Derek C,12

    Sam,23

];

Thanks.

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I see a number of issues here... I think you need to go through some basic scripting training/tutorial and clarify the terminology:

1. Crosstable load is only necessary if you have one of the dimensions running across (like for example 12 months in 12 columns). Your Load only lists 2 fields - EmpID and EmployeeName, so no Crosstable is necessary in this case.

2. The prefix "Concatenate" caused the data from inline load to be appended to the previously loaded table. If you wanted to end up with 2 tables, then you should remove "Concatenate".

3. Both tables seem to hold Employee ID and Name - why not name the fields identically and let then concatenate?

cheers,

Oleg Troyansky

Ask me about Qlik Sense Expert Class!

View solution in original post

11 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I see a number of issues here... I think you need to go through some basic scripting training/tutorial and clarify the terminology:

1. Crosstable load is only necessary if you have one of the dimensions running across (like for example 12 months in 12 columns). Your Load only lists 2 fields - EmpID and EmployeeName, so no Crosstable is necessary in this case.

2. The prefix "Concatenate" caused the data from inline load to be appended to the previously loaded table. If you wanted to end up with 2 tables, then you should remove "Concatenate".

3. Both tables seem to hold Employee ID and Name - why not name the fields identically and let then concatenate?

cheers,

Oleg Troyansky

Ask me about Qlik Sense Expert Class!
Not applicable
Author

Thanks Oleg,Now i have different field in Table2 comparing Filename which is Table1 lets say.

Filename:

LOAD EmpID,

     EmployeeName

FROM [E:\qv assignement\filename*.qvd](qvd);

Table2:

LOAD * INLINE [

    Dept, Location, Country

    Facility, NY, US

    Transport, NJ, US

    IT, Dallas, US

    Accounts, Mumbai, IND

    Banking, Delhi, IND

    HR, Washington, USA

    Finance, Mexico, USA

    Administration, California, USA

];

Not applicable
Author

If i have a primary key or same field in both then i can see two tables but with concatenate i want to know.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I can't understand your question, please clarify.

Now you have 2 disconnected tables, because there is nothing in common between them. If you concatenate them, you'll get a single table, with two disconnected slices of data - the first N rows will only contain Employee information and the second M rows will only contain Departments, with no associations between them.

If you could clarify your questions and what are you trying to accomplish, I can try to help you.

thanks!

Oleg

Ask me about Qlik Sense Expert Class!
adnan_rafiq
Partner - Creator II
Partner - Creator II

Place you cursor in inline load script and press CTRL + E

Not applicable
Author

Thanks Oleg.I have rectified the script and added some into it now.When i reload this script for the Resident load.it's blowing up with TotalSal field not found error.But i have renamed the field Salary AS TotalSal in Table2 and used that in Table3.Am i missing something?

Table1:

LOAD EmpID,

     EmployeeName

FROM

(qvd);

LOAD * INLINE [

    EmpID, Dept, Salary AS TotalSal

    1, Admin, 1000

    2, HR, 1500

    3, IT, 2300

    4, Finance, 2400

    5, Admin, 1200

    6, HR, 1300

    7, IT, 1500

    8, HR, 2500

    10, Facility, 1500

    14, IT, 1435

    15, Admin, 1455

    16, HR, 2540

    19, IT, 1300

    20, IT, 2000

    22, HR, 1300

    23, IT, 2450

    25, HR, 2670

    26, Facility, 3425

];

Table3:

LOAD

Dept,

Sum(TotalSal) as GrossSal

Resident Table2

group By Dept;

Not applicable
Author

Thanks Adnan.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I see two problems:

1. There is no table name Table2: in front of the INLINE load

2. Renaming the fields is not possible within the INLINE load - simply Use the name TotalSal from the beginning, without using the name Salary.

Ask me about Qlik Sense Expert Class!
Not applicable
Author

Thanks Oleg.Sorry i missed to mention Table2: here. attached my datamodel.though i'm unsure about the replica of Table1 and Table3 in this picture.But in my Tableviewer,Table2 is linked to Table1 with EmpID as the key and Table3 with Dept as the key or field.If i'm not wrong,Table2 is the Fact Table here and Table1 and Table3 are my dimensional ones?

I want to use a calender for year Aug/2012 to Aug/2013 .Is it possible in the Script?

Thanks.