Multiple crosstables uploads from a single source table
Hello All,
I have a single excel sheet which provides data for 5 divisions of the company divided across Jobs, hours spent and turnover. I would want the parts of Jobs, hours spent and Turnover to be as a crosstable and then concatenated.
CrossTable(CBrand,Hours,2) Load MonthasComp_Month, Number & ' - ' & Monthas%BS_DateKey, //Number as BS_Num, Vegetable1 as Vegetable, Fruit1 as Fruit, Drinks1 as Drinks, Clothing1 as Clothing, Cosmetics1 as Cosmetics, Others1 as Others FROM [$(vOtherDataLocation)\Report - *.xlsx] (ooxml, embeddedlabels, headeris 1 lines, tableis Report);
Extras2:
CrossTable(CBrand,Turnover,2) Load MonthasComp_Month, Number & ' - ' & Monthas%BS_DateKey, //Number as BS_Num, Vegetable2 as Vegetable, Fruit2 as Fruit, Drinks2 as Drinks, Clothing2 as Clothing, Cosmetics2 as Cosmetics, Others2 as Others FROM [$(vOtherDataLocation)\Report - *.xlsx] (ooxml, embeddedlabels, headeris 1 lines, tableis Report);
left join(Division_Details)
Load *
Resident Extras1;
left join(Division_Details)
Load *
Resident Extras2;
Drop table Extras1, Extras2;
However, in this case it just sums up data from all 6 divisions and then duplicates the value. Can you please help with this.