File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
superset-frontend/plugins/plugin-chart-table/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -589,6 +589,8 @@ const config: ControlPanelConfig = {
589
589
last ( colname . split ( '__' ) ) !== timeComparisonValue ,
590
590
)
591
591
. forEach ( ( colname , index ) => {
592
+ // Skip unprefixed percent metric columns if a prefixed version exists
593
+ // But don't skip if it's also a regular metric
592
594
if (
593
595
colname &&
594
596
! colname . startsWith ( '%' ) &&
@@ -602,8 +604,10 @@ const config: ControlPanelConfig = {
602
604
getMetricLabel ( metric ) === colname ,
603
605
)
604
606
) {
605
- return ;
607
+ return ; // skip this column
606
608
}
609
+
610
+ // Check if column is a regular metric or percentage metric
607
611
const isMetric = explore . form_data . metrics ?. some (
608
612
metric => getMetricLabel ( metric ) === colname ,
609
613
) ;
@@ -613,6 +617,7 @@ const config: ControlPanelConfig = {
613
617
`%${ getMetricLabel ( metric ) } ` === colname ,
614
618
) ;
615
619
620
+ // Generate comparison columns for metrics (time comparison feature)
616
621
if ( isMetric || isPercentMetric ) {
617
622
const comparisonColumns =
618
623
generateComparisonColumns ( colname ) ;
You can’t perform that action at this time.
0 commit comments