Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dont know why i am getting this error, my script is following
//Order table
Facts:
LOAD
OrderID,
CustomerID,
CustomerID as[Customer Record Counter],
EmployeeID,
EmployeeID as SalesEmployeeID,
Freight,
OrderDate,
RequiredDate,
ShipAddress,
ShipCity,
ShipCountry,
ShipName,
ShippedDate,
ShipPostalCode,
ShipRegion,
ShipVia,
ApplyMap('Shippers_Name_Map',ShipVia,'Shipper NF') as [Shipper Name],
ApplyMap('Shippers_Contact_Map',ShipVia,'Shipper NF') as [Shipper Contact];
SQL SELECT *
FROM Orders;
//[Order Details]:
left join(Facts)
load
*,
LineSalesAmount - [Cost of Goods Sold] as Margin;
LOAD Discount,
OrderID,
ProductID,
Quantity,
UnitPrice,
Quantity * UnitPrice*(1- Discount) as LineSalesAmount,
ApplyMap('Product_Map',ProductID,0) * Quantity as [Cost of Goods Sold];
SQL SELECT *
FROM `Order Details`;
[Order Aggr]:
load
OrderID,
1 as [Order Recort Counter],
sum(LineSalesAmount) as [Order total]
resident Facts
group by OrderID;
Try giving a space here:
Facts:
LOAD
OrderID,
CustomerID,
CustomerID as [Customer Record Counter],
Try giving a space here:
Facts:
LOAD
OrderID,
CustomerID,
CustomerID as [Customer Record Counter],