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: 
shayraber
Creator
Creator

loading and aggregating few excel sheets

hi all,

I'm new with QV and I'm facing an issue regarding loading of an excel file with 2 sheets needed to be aggregated into one table.

asuming i have a sheet like this:

IDNameAmountType
1AAA2A
2BBB12A
3CCC0A
..............

and the second sheet looks like this:

IDNameAmountType
1AAA0B

BBB454B
3CCC77B
................

and the result input talbe at the QV should look like this:

IDNameAmount
1AAA2 (=2+0)
2BBB466 (=12+454)
3CCC77 (=0+77)
..............

how can it be done?

thanks and best regards,

Shay

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Shay,

In this case I'd use the ApplyMap() function to take values under Amount in sheet one and add to sheet two, creating a table with both values. The script should look like the following code:

FirstSheetMap:

MAPPING LOAD ID & '/' & Name AS Key

     Amount

FROM

File.xls

(biff, embedded labels, table is Sheet1$);

TableWithTotals:

LOAD ID,

     Name,

     ApplyMap('FirstSheetMap', ID & '/' & Name) + Amount AS TotalAmount,

     Type

FROM

File.xls

(biff, embedded labels, table is Sheet1000$);

Hope that helps.

Miguel

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hi Shay,

In this case I'd use the ApplyMap() function to take values under Amount in sheet one and add to sheet two, creating a table with both values. The script should look like the following code:

FirstSheetMap:

MAPPING LOAD ID & '/' & Name AS Key

     Amount

FROM

File.xls

(biff, embedded labels, table is Sheet1$);

TableWithTotals:

LOAD ID,

     Name,

     ApplyMap('FirstSheetMap', ID & '/' & Name) + Amount AS TotalAmount,

     Type

FROM

File.xls

(biff, embedded labels, table is Sheet1000$);

Hope that helps.

Miguel

shayraber
Creator
Creator
Author

Miguel,

THANKS A LOT!!!