What This Table Is
The pa_scores table is the data warehouse for Performance Analytics, storing every KPI value calculated by PA collection jobs. Each record represents a single score for a specific indicator at a point in time, along with dimensional breakdowns (by assignment group, category, location, etc.). This is where PA stores the actual numbers that appear in dashboards, widgets, and analytics hubs.
The table is owned by the Performance Analytics module and supports the entire PA ecosystem — from data collection through visualization. PA jobs run on schedule, calculate indicator values, and write millions of score records. These scores power PA dashboards, timeline widgets, scorecard breakdowns, and trend analysis across the platform.
The pa_scores table doesn't extend any other table — it's a standalone entity designed for time-series data. No other tables extend it either. The closest relationships are with pa_indicators (which define what to measure) and pa_cubes (which define dimensional breakdowns).
On mature instances, this table contains millions to hundreds of millions of records. Large enterprises typically see 50M+ records after two years of PA usage. The table grows continuously as PA jobs run — daily indicators add ~365 records per year per breakdown dimension. Unfiltered queries will timeout or crash your instance.
When You'll Script Against This Table
You'll script against pa_scores primarily in Scheduled Script Execution for custom reporting, Script Includes for dashboard APIs, and Business Rules for score-based notifications. Most custom PA integrations hit this table to extract historical trends, calculate custom aggregations, or export data for external analytics platforms. The pa_reader role is required for read access.
Performance Analytics has tight ACLs — only users with pa_admin or pa_power_user can modify scores. Most scripting happens in global scope since PA is typically a platform-wide capability. Background scripts inherit the running user's PA permissions, so test with appropriate role grants.
Common scripting patterns:
- Extract time-series data for specific indicators to build custom charts or reports
- Calculate rolling averages, percentile rankings, or year-over-year comparisons
- Trigger notifications when scores cross thresholds or show concerning trends
- Aggregate scores across multiple indicators for executive dashboards
- Export PA data to external business intelligence tools or data lakes
- Validate or correct score data after PA job failures or configuration changes
- Build custom PA widgets that combine multiple indicators or apply business logic
Table Gotchas
Never query pa_scores without filtering by indicator and date range. Unfiltered queries on large instances will timeout and potentially impact system performance for all users.
- The
valuefield stores numbers as strings — useparseFloat()for mathematical operations or comparisons - Dimensional breakdown fields (
cube_1,cube_2, etc.) contain sys_ids, not display values — join to the appropriate reference table for readable names
Score records can be updated or deleted when PA jobs re-run historical data. Don't cache score sys_ids or assume records are immutable.
- The
time_spanfield indicates the aggregation period (daily, weekly, monthly) — filter by this when you need specific granularity - Queries by date range perform best using
time_span_startandtime_span_endfields, which are indexed and optimized for range queries - Some indicators produce null or empty values — check
valuefield existence before processing to avoid script errors
Enjoying this? Get one deep-dive per week.
Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.
Related Tables
The pa_indicators table defines what each score measures — indicator name, description, calculation method, and target values. Every score record references an indicator through the indicator field. The pa_cubes table defines dimensional breakdowns — how scores are segmented by assignment group, location, priority, etc.
When building queries that need readable breakdown names, you'll frequently join pa_scores with sys_user_group (for assignment group breakdowns), cmn_location (for location breakdowns), or cmn_department (for department breakdowns). The specific tables depend on which cube dimensions are configured for each indicator.
The pa_dashboards and pa_widgets tables reference pa_scores indirectly through indicator configuration. When troubleshooting widget display issues or building custom analytics interfaces, you'll often query across all three tables to understand how scores flow into visualizations.