How to resolve incorrect results when using filter conditions in a Performance Analytics indicatorIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Resolve incorrect results in the Analytics Hub when filter conditions are applied to a Performance Analytics indicator. When a filter condition is added to an indicator, the Analytics Hub may return incorrect record counts or display unexpected records that do not match the filter criteria. Steps to reproduce Modify the base system Number of resolved incidents indicator to add the following condition: Resolved relative to or before 1 month ago.Add the indicator to the Analytics Hub if it is not already present.In the Overview tab of the Analytics Hub, select Real-time in the date picker and select Show Records. The incidents resolved within the last month are displayed.Select an earlier date in the date picker and select Show Records.Group by Incident state. New and In Progress incidents appear with Resolved showing as empty. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All supported releases Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } When filter conditions are applied to an indicator, the platform converts them internally to JavaScript and uses GlideFilter to evaluate whether records match the conditions. By design, GlideFilter returns true for records with NULL or 0 values. This causes the indicator to include records that do not meet the filter criteria, resulting in an incorrect count. Based on PRB1037282, the behavior of GlideFilter matching both 0 and null when evaluating =0 has been present in the platform since at least the Calgary release and will not be changed. The following scripts illustrate the issue. Script 1 returns incorrect results because GlideFilter evaluates unresolved incidents as matching the resolved date condition. Script 2 returns correct results by adding resolved_atISNOTEMPTY to exclude records with an empty resolved date. Script 1 — incorrect results: var rec = new GlideRecord('incident'); rec.query(); var bool = true; var cond1 = 'resolved_atRELATIVELE@dayofweek@ago@14^EQ'; var count = 0; while(rec.next()) { bool = GlideFilter.checkRecord(rec, cond1, true); gs.print("number "+ rec.number + " - is " + bool + " - State: " + rec.state + " - Resolved: " + rec.resolved_at); } Script 2 — correct results: var rec = new GlideRecord('incident'); rec.query(); var bool = true; var cond1 = 'resolved_atRELATIVELE@dayofweek@ago@14^resolved_atISNOTEMPTY^EQ'; var count = 0; while(rec.next()) { bool = GlideFilter.checkRecord(rec, cond1, true); gs.print("number "+ rec.number + " - is " + bool + " - State: " + rec.state + " - Resolved: " + rec.resolved_at); } Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Two workarounds are available for this issue. Workaround 1: Move the filter condition to the indicator source Move the filter condition from the indicator to the indicator source. Because GlideFilter is not used to evaluate records against the indicator source filter, this produces correct results when using non-real-time data in the Analytics Hub. Workaround 2: Add a "Resolved is not empty" condition to the indicator Keep the existing filter conditions on the indicator and add the condition Resolved is not empty. This excludes records with an empty resolved date and returns the correct results.