Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
joydipp1988
Creator
Creator

Sales Measures, how to calculate?

Hi all, stalwar1johnwmarcowedelabhishekaggarwal‌‌

I have following two tables on Sales data. I have to calculate Sales measures like COGS, Sales_Amount, Margin_Amount. Please suggest what should be the calculations based on the fields given below.

SALES_ORDER_DETAIL:                                 

SalesOrderID (pk)

SalesOrderDetailID

CarrierTrackingNumber

OrderQty

ProductID

SpecialOfferID

UnitPrice

UnitPriceDiscount

LineTotal     (LineTotal = UnitPrice - (UnitPrice * UnitPriceDiscount))

SALES_ORDER_HEADER:

SalesOrderID (fk)

RevisionNumber

OrderDate

DueDate

ShipDate

Status

OnlineOrderFlag

SalesOrderNumber

PurchaseOrderNumber

AccountNumber

CustomerID

ContactID

SalesPersonID

TerritoryID

BillToAddressID

ShipToAddressID

ShipMethodID

CreditCardID

CreditCardApprovalCode

CurrencyRateID

SubTotal

TaxAmt

Freight

TotalDue         (TotalDue = SubTotal + TaxAmt + Freight)

Please help. Thanks in advance.

Joy

2 Replies
karthiksrqv
Partner - Creator II
Partner - Creator II

Hi,

Could you elaborate?

You'd load the above tables and based on your needs, do a group by sum or min or max.

joydipp1988
Creator
Creator
Author

Hi,

Thanks for the reply. I know But my question was different. I want to know the formula to calculate the sales measures like COGS, Sales Amount, Sales Margin. I need the formula based on the fields mentioned.

Thanks,

Joy