From 6813b0868a2cf48d26727b59a97fd1ef9fbd1cdf Mon Sep 17 00:00:00 2001 From: Brian Holmes <120223836+briangregoryholmes@users.noreply.github.com> Date: Sat, 7 Dec 2024 11:36:31 -0500 Subject: [PATCH] fix: filter measure selection dropdown (#6234) --- .../features/dashboards/state-managers/selectors/measures.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web-common/src/features/dashboards/state-managers/selectors/measures.ts b/web-common/src/features/dashboards/state-managers/selectors/measures.ts index 5e5c0d4ae2c..b49a02c7155 100644 --- a/web-common/src/features/dashboards/state-managers/selectors/measures.ts +++ b/web-common/src/features/dashboards/state-managers/selectors/measures.ts @@ -67,13 +67,15 @@ export const isMeasureValidPercentOfTotal = ({ export const filteredSimpleMeasures = ({ validMetricsView, + validExplore, }: DashboardDataSources) => { return () => { return ( validMetricsView?.measures?.filter( (m) => !m.window && - m.type !== MetricsViewSpecMeasureType.MEASURE_TYPE_TIME_COMPARISON, + m.type !== MetricsViewSpecMeasureType.MEASURE_TYPE_TIME_COMPARISON && + validExplore?.measures?.includes(m.name ?? ""), ) ?? [] ); };