Last updated: 2024-10-22
Creating Custom metrics in Analytics
Here is a brief guide to all the functions and operators you can use to get started and build your own metrics:
What is a metric?
A metric is a number property that you can measure or operate on.
Example: Tickets reopened is a metric that measures the number of times a ticket was reopened
How to create custom metrics?




Note: Only users with edit and export access can create and modify the custom metrics.
Custom metrics functions:
You can use all the functions shown below to create and customize your existing metrics.
| COMMAND | MEANING |
| Function - Number | |
| fx CEIL | Returns the least integer greater than or equal to X<br>Example<br>CEIL (2.5) is 3 |
| fx FLOOR | Returns the largest integer lesser than or equal to X<br>Example<br>FLOOR (2.5) is 2 |
| fx ROUND | Round the number up to nearest integer value.<br>Example<br>ROUND (2.5) is 3 |
| fx EXP | Returns the value of e (Euler's number) to the power of X<br>Example<br>EXP (2) is 7.38906 |
| fx GREATEST | Returns greatest value among all fields<br>Example<br>GREATEST (1, 2, 3) returns 3 |
| fx LEAST | Returns least value among all fields<br>Example<br>LEAST (1, 2, 3) returns 1 |
| fx LN | Returns the value of the natural logarithm function of X (base e logarithm of X)<br>Example<br>LN (2) is 0.6931471805599453 |
| fx POWER | Returns the value of X to the power of Y<br>Example<br>POWER (2, 3) will return 8 |
| fx SQRT | Returns the value of the square root of X.<br>Example<br>SQRT (4) will return 2 |
| Function - Aggregator | |
| fx AVG | Returns the average value of a numeric expression X<br>Example<br>AVG ( Number ) |
| fx MAX | Returns the maximum value of a numeric expression X<br>Example<br>MAX ( Number ) |
| fx MIN | Returns the minimum value of a numeric expression X<br>Example<br>MIN ( Number ) |
| fx SUM | Returns the sum value of a numeric expression X<br>Example<br>SUM ( Number ) |
| Function - Operators | |
| + | Addition |
| - | Subtraction |
| \* | Multiplication |
| / | Division |
| % | Modular Division |
How to access the metrics you create?

Sample Metrics:
1. Measuring efficient tickets resolved by calculating and subtracting them from reopened tickets. - Formula: Total(Tickets resolved) - total(tickets reopened)
2. Creating a metric called actual resolution time measures the time taken to resolve a ticket after it is in ‘X’ status to the time it was resolved. - Formula: Sum(Time spent in business hours) - Filter: list of statuses
3. Measuring the number of emails and not the number of customer interactions. Therefore the first email customer sends is the first email. - Formula: Total(customer interactions) + 1
4. Track a metric like “Total Replies,” which would be a combination of both “Agent Replies” and “Customer Replies”. - Formula: Total Replies = Agent reply count + Customer Reply count
``` Note: You can create custom metrics across different modules, meaning the metrics you define are not restricted to a single module. Combining data from multiple modules allows you to generate comprehensive reports tailored to your needs. ```