AX - Metric
Overview
AX - Metric is a Lightning App Builder component that displays calculated values from your Salesforce records—such as totals, averages, counts, and other aggregations—on record, app, and home pages.
Use it to show essential numbers at a glance, such as total revenue, average deal size, open case counts, or any custom calculation from your data. Configure the metric label, icon, formatting, and data source right in App Builder without formulas or code.
Perfect for executive dashboards, performance scorecards, at-a-glance summaries on record pages, or anywhere users need to see key numbers without running reports.
Key Features
Supports multiple aggregation functions
Customizable with icons and formatting
Displays data in cards or standalone
Use Cases
Opportunity Page: Show average deal size or total quote value with an owner avatar.
Account Page: Display open case count or maximum past purchase value.
Campaign Page: Present total leads or highest engagement rate with bold indicators.
Sales Dashboard: Summarize pipeline value or deals per rep with team avatars.
Service Management Overview: Show max resolution time or average CSAT score.
Marketing Overview: Display campaign ROI or lead count with visual cues.
Configuration
Add the Metric component to a Lightning page in App Builder and configure it via the Properties Panel.
Basic Properties
These control the data source, calculation, and display of the Metric component.
Object Api Name
String
API name of the Salesforce object for metric data (e.g., Opportunity).
Opportunity
Filter
String
SOQL WHERE clause to filter records (e.g., StageName = 'Closed Won').
Status = 'Open'
Field Field Name
String
Numeric field to aggregate (e.g., Amount).
ExpectedRevenue
Aggregate Function
String
Aggregation type (options: SUM, AVG, COUNT, COUNT_DISTINCT, MAX, MIN).
SUM
Icon Name
String
SLDS icon to display with the metric (e.g., utility:metrics).
standard:opportunity
Label
String
Text above or beside the metric value (e.g., “Total Value”).
“Average Deal Size”
Description
String
Subtitle for additional context (e.g., “Last 30 days”).
“Based on Closed Deals”
Prefix
String
Text before the value (e.g., $).
No. of
Suffix
String
Text after the value (e.g., hrs).
%
Tooltip
String
Hover text for more details (e.g., “Total of open opportunities”).
“Click for details”
Display as Card
Boolean
Shows the metric in a card layout if true.
true
Examples
Example 1: Total Opportunities on Opportunity Page
Scenario: Display a key performance indicator showing the total value of all active opportunities, providing sales teams with immediate visibility into pipeline value.
Steps
Result: A prominently displayed card showing the total value of all active opportunities, giving sales teams instant visibility into their pipeline performance
Key Considerations
Data Source: Use
Filterto limit records; ensureField Field Nameis numeric.Formatting: Add
PrefixorSuffixfor clarity (e.g., currency symbols).Performance: Set a low
Maximum Number of Recordsfor large datasets.Accessibility: Test contrast with icons; use tooltips for context.
Limitations: Respects sharing/FLS rules; no real-time updates.
Troubleshooting Common Issues
No Value Displayed: Check
Field Field NameandFiltersyntax; verify field permissions.Wrong Calculation: Ensure
Aggregate Functionmatches the field type (e.g., Number for SUM).Card Not Showing: Confirm
Display as Cardistrue.If Issues Persist: Contact our support team at [email protected] for assistance.
Summary
The Avonni Metric component enhances Lightning pages with actionable KPI displays. It’s ideal for dashboards or record insights.
Last updated
Was this helpful?
