Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Excel Sheets with Same column names

Hi all,

I'm new to QlikView and I've got a problem.

I want to import data from Excel file. The file has 2 different sheets with exact same column names.

All column names are same in both sheets.

Questions :

How can I load two sheets in "Edit Script"? (I know file name and names of sheets)

How can I read different data from columns with same names?

I want to compare these two sheets' data.

Please any suggestions? Thank you.

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Excel Sheets with Same column names

Load your data like this:

Data:

LOAD ID,

  Name,

  Amount,

  'Sheet1' As Source

FROM test.xlsx

(ooxml, embedded labels, table is Sheet1);

Concatenate(Data)

LOAD ID,

  Name,

  Amount,

  'Sheet2' As Source

FROM test.xlsx

(ooxml, embedded labels, table is Sheet2);

Then you can compare the two sheets. For example, in a straight table with ID and Name as dimensions, use these two expressions to compare the amounts:

     =Sum({<Source = {'Sheet1'}>} Amount)

     =Sum({<Source = {'Sheet2'}>} Amount)


and these two to compare row counts:

     =Count({<Source = {'Sheet1'}>} Amount)

     =Count({<Source = {'Sheet2'}>} Amount)


Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
Highlighted
MVP
MVP

Re: Excel Sheets with Same column names

Load your data like this:

Data:

LOAD ID,

  Name,

  Amount,

  'Sheet1' As Source

FROM test.xlsx

(ooxml, embedded labels, table is Sheet1);

Concatenate(Data)

LOAD ID,

  Name,

  Amount,

  'Sheet2' As Source

FROM test.xlsx

(ooxml, embedded labels, table is Sheet2);

Then you can compare the two sheets. For example, in a straight table with ID and Name as dimensions, use these two expressions to compare the amounts:

     =Sum({<Source = {'Sheet1'}>} Amount)

     =Sum({<Source = {'Sheet2'}>} Amount)


and these two to compare row counts:

     =Count({<Source = {'Sheet1'}>} Amount)

     =Count({<Source = {'Sheet2'}>} Amount)


Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

Highlighted
Not applicable

Re: Excel Sheets with Same column names

Thank you. It works like a charm. I really appreciate for your reply. Thanks again.