Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Syntax error, missing/misplaced FROM: Facts:

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;

1 Solution

Accepted Solutions
sunny_talwar

Try giving a space here:

Capture.PNG

Facts:

LOAD

    OrderID,

    CustomerID,

    CustomerID as [Customer Record Counter],

View solution in original post

1 Reply
sunny_talwar

Try giving a space here:

Capture.PNG

Facts:

LOAD

    OrderID,

    CustomerID,

    CustomerID as [Customer Record Counter],