Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Kelsmer
Contributor
Contributor

Join Multiple tables

Hi all, Please assist here.

how can I join the Two Pivot tables to a Long Sales Table. first Pivot Table where Fin-Year is Equal to 2016 and 2nd pivot table where Fin-Year is Equal to 2017 but while loading both Pivot table from excel files and not as Inline. the only common field is "Pack Size".

2016 Financial Year (1 Jul 2015 to 30 Jun 2016)

Brand1L2L500ml250ml 
ColaMaxZAR 13.50ZAR 26.00ZAR 8.50ZAR 6.00 
FizzyPeachZAR 13.50ZAR 26.00ZAR 8.50ZAR 6.00 
GrapeSupremeZAR 13.50ZAR 26.00ZAR 8.50ZAR 6.00 
JuicyAppleZAR 13.50ZAR 26.00ZAR 8.50ZAR 6.00 
PinePopZAR 13.50ZAR 26.00ZAR 8.50ZAR 6.00 
SuperMaxZAR 13.50ZAR 26.00ZAR 8.50ZAR 6.00 
VeryBerryZAR 13.50ZAR 26.00ZAR 8.50ZAR 6.00 
XtremeOrangeZAR 18.50ZAR 26.00ZAR 13.00ZAR 9.00 

CrossTable ("Pack Size",Price)
LOAD
Brand,
"1L",
"2L",
"500ml",
"250ml"
FROM [lib://DataFiles/Tables.xlsx]
(ooxml, embedded labels, table is [Table 1]);

2017 Financial Year (1 Jul 2016 to 30 Jun 2017)

Brand1L2L500ml250ml
ColaMaxZAR 15.00ZAR 28.00ZAR 11.00ZAR 8.00
FizzyPeachZAR 15.00ZAR 28.00ZAR 11.00ZAR 8.00
GrapeSupremeZAR 15.00ZAR 28.00ZAR 11.00ZAR 8.00
JuicyAppleZAR 15.00ZAR 28.00ZAR 11.00ZAR 8.00
PinePopZAR 15.00ZAR 28.00ZAR 11.00ZAR 8.00
SuperMaxZAR 15.00ZAR 28.00ZAR 11.00ZAR 8.00
VeryBerryZAR 15.00ZAR 28.00ZAR 11.00ZAR 8.00
XtremeOrangeZAR 22.00ZAR 40.00ZAR 17.00ZAR 11.00

 

CrossTable ("Pack Size",Price)
LOAD
Brand,
"1L",
"2L",
"500ml",
"250ml"
FROM [lib://DataFiles/Tables.xlsx]
(ooxml, embedded labels, table is [Table 2]);


Sales:

LOAD
FinYear,
"Year",
"Month",
Brand,
"Pack Size",
Region,
Channel,
"Sales Qty"
FROM [lib://DataFiles/Sales 2017 and 2016.xls]
(biff, embedded labels, table is Sheet1$);

Labels (1)
1 Reply
Lisa_P
Employee
Employee

For each table add a new field that indicates the year.

Table 1

'2016' as FinYear,

Table 2

'2017' as FinYear,

 

This could also be derived if the original file/sheet name includes the year.