Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Logic For Fields

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

😎Net Sales for specific Year

9) Sales Rep

10)Cost

Thanks

venky

sunindiamovalk

2 Replies
ramoncova06
Specialist III
Specialist III

huh ?

sorry your request is not clear, you want to know how to calculate those metrics ?

that is something I would go back to internal team and not try to get a generic answer on how to do it

Not applicable
Author

Ya i need those Mertrics..

they gave as

Gross Sales = [UnitPrice] * [Quantity]

Net Sales = ([UnitPrice] * [Quantity]) * (1-Discount)

But about remaining metrics??