diff --git a/frontend/src/scenes/experiments/Metrics/PrimaryGoalTrends.tsx b/frontend/src/scenes/experiments/Metrics/PrimaryGoalTrends.tsx index 0ce1cb72e33da..70e41c599abba 100644 --- a/frontend/src/scenes/experiments/Metrics/PrimaryGoalTrends.tsx +++ b/frontend/src/scenes/experiments/Metrics/PrimaryGoalTrends.tsx @@ -24,6 +24,10 @@ export function PrimaryGoalTrends(): JSX.Element { const metricIdx = 0 const currentMetric = experiment.metrics[metricIdx] as ExperimentTrendsQuery + // :FLAG: CLEAN UP AFTER MIGRATION + const isDataWarehouseMetric = + featureFlags[FEATURE_FLAGS.EXPERIMENTS_HOGQL] && + currentMetric.count_query.series[0].kind === NodeKind.DataWarehouseNode return ( <> @@ -59,10 +63,18 @@ export function PrimaryGoalTrends(): JSX.Element { MathAvailability.All ) - setTrendsMetric({ - metricIdx, - series, - }) + if (series[0].kind === NodeKind.DataWarehouseNode) { + setTrendsMetric({ + metricIdx, + series, + filterTestAccounts: false, + }) + } else { + setTrendsMetric({ + metricIdx, + series, + }) + } } else { if (actions?.length) { setExperiment({ @@ -101,35 +113,37 @@ export function PrimaryGoalTrends(): JSX.Element { showNumericalPropsOnly={true} {...commonActionFilterProps} /> -
- { - // :FLAG: CLEAN UP AFTER MIGRATION - if (featureFlags[FEATURE_FLAGS.EXPERIMENTS_HOGQL]) { - const val = currentMetric.count_query?.filterTestAccounts - return hasFilters ? !!val : false - } - return hasFilters ? !!experiment.filters.filter_test_accounts : false - })()} - onChange={(checked: boolean) => { - // :FLAG: CLEAN UP AFTER MIGRATION - if (featureFlags[FEATURE_FLAGS.EXPERIMENTS_HOGQL]) { - setTrendsMetric({ - metricIdx, - filterTestAccounts: checked, - }) - } else { - setExperiment({ - filters: { - ...experiment.filters, - filter_test_accounts: checked, - }, - }) - } - }} - fullWidth - /> -
+ {!isDataWarehouseMetric && ( +
+ { + // :FLAG: CLEAN UP AFTER MIGRATION + if (featureFlags[FEATURE_FLAGS.EXPERIMENTS_HOGQL]) { + const val = currentMetric.count_query?.filterTestAccounts + return hasFilters ? !!val : false + } + return hasFilters ? !!experiment.filters.filter_test_accounts : false + })()} + onChange={(checked: boolean) => { + // :FLAG: CLEAN UP AFTER MIGRATION + if (featureFlags[FEATURE_FLAGS.EXPERIMENTS_HOGQL]) { + setTrendsMetric({ + metricIdx, + filterTestAccounts: checked, + }) + } else { + setExperiment({ + filters: { + ...experiment.filters, + filter_test_accounts: checked, + }, + }) + } + }} + fullWidth + /> +
+ )} {isExperimentRunning && ( Preview insights are generated based on {EXPERIMENT_DEFAULT_DURATION} days of data. This can cause a