Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have the following code: Oddly the script loads, but there is no data model (there appears to be no data in the model at all). What could be causing this?
See the following code:
Temp_Packaging:
LOAD
KPI_ID,
Department,
Subdepartment,
SubSubDepartment,
Accountable,
Shared,
"Measure Category",
"Measure",
Unit,
FY22,
FY23,
Act. as P01_Actual,
Plan as P01_Plan,
Act.1 as P02_Actual,
Plan1 as P02_Plan,
Act.2 as P03_Actual,
Plan2 as P03_Plan,
Act.3 as P04_Actual,
Plan3 as P04_Plan,
Act.4 as P05_Actual,
Plan4 as P05_Plan,
Act.5 as P06_Actual,
Plan5 as P06_Plan,
Act.6 as P07_Actual,
Plan6 as P07_Plan,
Act.7 as P08_Actual,
Plan7 as P08_Plan,
Act.8 as P09_Actual,
Plan8 as P09_Plan,
Act.9 as P10_Actual,
Plan9 as P10_Plan,
Act.10 as P11_Actual,
Plan10 as P11_Plan,
Act.11 as P12_Actual,
Plan11 as P12_Plan
FROM [lib://Meppel Data Connection/5_Production_Control_System/S5_Generic/S5_Generic_APP02_OGSM/Source_Manual/OGSM.xlsx]
(ooxml, embedded labels, header is 4 lines, table is Packaging);
Packaging_Actuals:
Crosstable(Actuals_Period, Actuals_Value, 11)
LOAD
KPI_ID,
Department,
Subdepartment,
SubSubDepartment,
Accountable,
Shared,
"Measure Category",
"Measure",
Unit,
FY22,
FY23,
P01_Actual,
P02_Actual,
P03_Actual,
P04_Actual,
P05_Actual,
P06_Actual,
P07_Actual,
P08_Actual,
P09_Actual,
P10_Actual,
P11_Actual,
P12_Actual
RESIDENT Temp_Packaging;
Packaging_Planned:
Crosstable(Plan_Period, Plan_Value, 11)
LOAD
KPI_ID,
Department,
Subdepartment,
SubSubDepartment,
Accountable,
Shared,
"Measure Category",
"Measure",
Unit,
FY22,
FY23,
P01_Plan,
P02_Plan,
P03_Plan,
P04_Plan,
P05_Plan,
P06_Plan,
P07_Plan,
P08_Plan,
P09_Plan,
P10_Plan,
P11_Plan,
P12_Plan
RESIDENT Temp_Packaging;
Final_Table:
LEFT JOIN (Packaging_Actuals)
LOAD
KPI_ID,
Department,
Subdepartment,
SubSubDepartment,
Accountable,
Shared,
"Measure Category",
"Measure",
Unit,
FY22,
FY23,
Plan_Period,
Plan_Value
RESIDENT Packaging_Planned;
TRACE 'Rows in Temp_Packaging: ' & NoOfRows('Temp_Packaging');
TRACE 'Rows in Packaging_Actuals: ' & NoOfRows('Packaging_Actuals');
TRACE 'Rows in Packaging_Planned: ' & NoOfRows('Packaging_Planned');
TRACE 'Rows in Final_Table: ' & NoOfRows('Final_Table');
DROP TABLE Temp_Packaging;
DROP TABLE Packaging_Actuals;
DROP TABLE Packaging_Planned;
Not really because this load is a join to a previous table and therefore no Final_Table is created.
You are deleting all loaded tables.
Ehm, I thought I should end up with one table called ''Final_Table''
Not really because this load is a join to a previous table and therefore no Final_Table is created.
Ah, I see; the JOIN requires an existing table for it to work. Thanks.