Sales Data from the Contoso Dataset

Source: R/data.R

This dataset contains information about sales orders, including order details, pricing, and customer data from the Contoso dataset. It provides insights into the transactions that have occurred, including order dates, delivery dates, customer and store information, as well as product details.

Usage

sales

Details

Each row is one line item on one order — the same grain as orderrows. This is the denormalised fact table: it repeats every column of orders and orderrows, adds the day’s exchange_rate, and pre-computes seven revenue, cost and margin measures.

Format

A data frame with 7,794 rows and 20 columns:

order_key

double Unique identifier for each order.

line_number

double Line number within the order (for multi-line orders).

order_date

Date Date when the order was placed.

delivery_date

Date Date when the order was delivered.

customer_key

double Unique identifier for the customer who placed the order.

store_key

double Unique identifier for the store where the order was placed.

product_key

double Unique identifier for the product in the order.

quantity

double The quantity of the product ordered.

unit_price

double The price per unit of the product.

net_price

double The price per unit after discount, in USD. Despite the name this is a unit figure, not a line total.

unit_cost

double The cost per unit of the product.

currency_code

character The currency the order was placed in (e.g., USD, EUR). Does not describe the money columns, which are all USD.

exchange_rate

double The USD-to-currency_code rate on order_date, from fx. 1.0 for USD orders. It has not been applied to the money columns — multiply if you want local currency.

gross_revenue

double A product’s unit_price multiplied by quantity.

net_revenue

double A product’s net_price multiplied by quantity.

unit_discount

double A product’s unit_price minus net_price.

discounts

double A product’s unit_discount multiplied by quantity.

cogs

double Cost of goods sold. A product’s unit_cost multiplied by quantity.

gross_margin

double A product’s net_revenue minus cogs.

unit_margin

double A product’s gross_margin divided by quantity.

Currency

Every money column is in USD, regardless of the order’s currency_code, so amounts sum directly across orders. Multiply by exchange_rate to express an amount in the currency the order was placed in.

Source

https://github.com/sql-bi/Contoso-Data-Generator-V2-Data/releases/tag/ready-to-use-data