2 Replies Latest reply: Jun 29, 2015 11:38 AM by venkat sai RSS

    Logic For Fields

    venkat sai

      Hi Friends,..

      I have following columns in my code.... 

       

      OrderID,

           CustomerID,

           ShipperID,

           EmployeeID,

           Freight,

          OrderDate,

        

           ProductID,

           UnitPrice,

           OrderID,

           Quantity,

           Discount,

       

      Categories:

      LOAD CategoryID,

           CategoryName,

           Description

      FROM

      [$(vQvdPath)Categories.qvd]

      (qvd);

       

      Customers:

      LOAD CustomerID,

           CompanyName,

           ContactName,

           Address,

           City,

           StateProvince,

           PostalCode,

           Country,

           Phone,

           Fax

      FROM

      [$(vQvdPath)Customers.qvd]

      (qvd);

       

      Employee:

      LOAD EmployeeID,

           [Last Name],

           [First Name],

           Title,

           [Hire Date],

           Office,

           Extension,

           [Reports To],

           [Year Salary]

      FROM

      [$(vQvdPath)Employee.qvd]

      (qvd);

       

       

      Office:

      LOAD Office,

           OfficeAddress,

           OfficePostalCode,

           OfficeCity,

           OfficeStateProvince,

           OfficePhone,

           OfficeFax,

           OfficeCountry

      FROM

      [$(vQvdPath)Office.qvd]

      (qvd);

       

       

      Products:

      LOAD ProductID,

           ProductName,

           SupplierID,

           CategoryID,

           QuantityPerUnit,

           UnitCost,

           Prod_UnitPrice,

           UnitsInStock,

           UnitsOnOrder

      FROM

      [$(vQvdPath)Products.qvd]

      (qvd);

       

       

      Shippers:

      LOAD ShipperID,

           Shipper_CompanyName

      FROM

      [$(vQvdPath)Shippers.qvd]

      (qvd);

       

       

       

      MasterCalendar:

      Right Keep (Orders)

      LOAD

           OrderDate,

           Week,

           Year,

           Month,

           MonthNo,

           DayofYear,

           MonthYear,

           YearMonth,

           Day,

           Quarter,

           YearWeek,

           WeekDay,

           WeekDayNo,

           WeekInMonth,

           CurYTDFlag,

           LastYTDFlag,

           CurMTDFlag,

           LastMTDFlag

      FROM

      [$(vQvdPath)MasterCalendar.qvd]

      (qvd) Where Year>=($(vMaxYear)-2);

       

      ...

      i need logic for following Fields...

       

      1)Sales

      2)Margin

      3)Margin%

      4)Gross Sales

      6)Gross Sales For specific Year

      7)Net Sales

      8)Net Sales for specific Year

      9) Sales Rep

      10)Cost

       

      Thanks

      venky

       

      stalwar1 movalk