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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Multiple table's data load

Hi All,

How to load the xls data in crosstab load as a one table.

Please advise.

Thanks in advance.

Data:

SALESMARKETINGACCOUNTING
YearSALARY102030YearJOB102030YearJOB102030
2015        3,600        1,200        1,200        1,2002014Analyst        1,230        1,230        1,2302015Analyst        1,200        1,200        1,200
2015        6,000        2,000        2,000        2,0002014Sr Analyst        1,600        1,600        1,6002015Sr Analyst        2,000        2,000        2,000
2015     13,680        4,560        4,560        4,5602014MANAGER        4,560        4,560        4,5602015MANAGER        4,560        4,560        4,560

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

CrossTable (DeptNo,SALARY,4)

LOAD 'Sales' As Tbl,

  Year,

     SALARY aS JOB,

     [10],

     [20],

     [30]

FROM

[Book1 - Copy.xlsx]

(ooxml, embedded labels, header is 1 lines, table is EmpData)

Where Len(Trim(Year)) > 0;

CrossTable (DeptNo,SALARY,4)

LOAD 'Marketing' As Tbl,

     Year1 As Year,

     JOB,

     [101] AS [10],

     [201] AS [20],

     [301] AS [30]

FROM

[Book1 - Copy.xlsx]

(ooxml, embedded labels, header is 1 lines, table is EmpData)

Where Len(Trim(Year1)) > 0;

CrossTable (DeptNo,SALARY,4)

LOAD 'Accounting' As Tbl,

     Year2 As Year,

     JOB1 As JOB,

     [102] AS [10],

     [202] AS [20],

     [302] AS [30]

FROM

[Book1 - Copy.xlsx]

(ooxml, embedded labels, header is 1 lines, table is EmpData)

Where Len(Trim(Year2)) > 0;

View solution in original post

7 Replies
Not applicable

Hi,

Can you provide your sample xls , you need to make use of transformation step may be if both sales & marketing are in same xls.

qlikviewwizard
Master II
Master II
Author

Attached.

sunilkumarqv
Specialist II
Specialist II

Firstly use  join

sales table with Marketing table then use cross table

crosstable(Field,value,3)

qlikviewwizard
Master II
Master II
Author

Could you please provide the code in QVW file?

anbu1984
Master III
Master III

LOAD 'Sales' As Tbl,

  Year,

    SALARY,

    [10],

    [20],

    [30]

FROM

[Book1 - Copy.xlsx]

(ooxml, embedded labels, header is 1 lines, table is EmpData)

Where Len(Trim(Year)) > 0;

LOAD 'Marketing' As Tbl,

    Year1 As Year,

    JOB As SALARY,

    [101] AS [10],

    [201] AS [20],

    [301] AS [30]

FROM

[Book1 - Copy.xlsx]

(ooxml, embedded labels, header is 1 lines, table is EmpData)

Where Len(Trim(Year1)) > 0;

LOAD 'Accounting' As Tbl,

    Year2 As Year,

    JOB1 As SALARY,

    [102] AS [10],

    [202] AS [20],

    [302] AS [30]

FROM

[Book1 - Copy.xlsx]

(ooxml, embedded labels, header is 1 lines, table is EmpData)

Where Len(Trim(Year2)) > 0;

qlikviewwizard
Master II
Master II
Author

Hi anbu1984,

Thanks for the file.

How to achive the same for crosstab table. 10,20,30 are to be new column as DEPTNO

anbu1984
Master III
Master III

CrossTable (DeptNo,SALARY,4)

LOAD 'Sales' As Tbl,

  Year,

     SALARY aS JOB,

     [10],

     [20],

     [30]

FROM

[Book1 - Copy.xlsx]

(ooxml, embedded labels, header is 1 lines, table is EmpData)

Where Len(Trim(Year)) > 0;

CrossTable (DeptNo,SALARY,4)

LOAD 'Marketing' As Tbl,

     Year1 As Year,

     JOB,

     [101] AS [10],

     [201] AS [20],

     [301] AS [30]

FROM

[Book1 - Copy.xlsx]

(ooxml, embedded labels, header is 1 lines, table is EmpData)

Where Len(Trim(Year1)) > 0;

CrossTable (DeptNo,SALARY,4)

LOAD 'Accounting' As Tbl,

     Year2 As Year,

     JOB1 As JOB,

     [102] AS [10],

     [202] AS [20],

     [302] AS [30]

FROM

[Book1 - Copy.xlsx]

(ooxml, embedded labels, header is 1 lines, table is EmpData)

Where Len(Trim(Year2)) > 0;