Calculation Method | Definition |
---|---|
SQL Expression | This is where you write standard SQL queries to define your metric’s calculation. This is typically used for precise and complex aggregations. |
LLM Prompt | Use a Large Language Model (LLM) to define the metric by selecting the Input column and providing a natural language prompt. |
Explain SQL in English (Beta) | Describe your desired SQL calculation in plain English and click on Test (a previous step before saving your result). The system will attempt to generate the corresponding SQL. |
Metric Name | Description | SQL Expression | Display Format |
---|---|---|---|
Revenue | Total revenue before discounts and returns | SUM(total_amount) | Currency (USD, 2 decimal places) |
Average Order Value | Average amount spent per order | AVG(total_amount) | Currency (USD, 2 decimal places) |
Profit Margin | Percentage of revenue that is profit | (SUM(total_amount) - SUM(cost)) / SUM(total_amount) * 100 | Percentage (1 decimal place) |
Items Per Order | Average number of items in each order | SUM(item_count) / COUNT(DISTINCT order_id) | Number (1 decimal place) |
Days to Ship | Average time between order and shipment | AVG(EXTRACT(DAY FROM ship_date - order_date)) | Number (1 decimal place) |
AverageSalesPerRep | Average Sales Per Rep | (Specific SQL would be defined in the system) | Automatic |
DollarConversionRate | (Add description in the system) | (Specific SQL would be defined in the system) | Automatic |
Total Revenue | Total revenue from closed-won opportunities | SUM(total_amount) (example) | Automatic |
Win_Rate | Ratio of the sum of amounts for closed won opportunities to the sum of amounts for closed won and closed loss opportunities. | (Specific SQL would be defined in the system) | Automatic |