sadpandajoe commented on code in PR #42976:
URL: https://github.com/apache/superset/pull/42976#discussion_r3820179079
##########
superset/utils/pandas_postprocessing/pivot.py:
##########
@@ -168,4 +297,7 @@ def pivot( # pylint: disable=too-many-arguments
# be silently dropped by stack's default dropna=True behavior.
df = df.stack(level=0, dropna=False).unstack()
+ if percent_mode is not None:
Review Comment:
When `combine_value_with_metric=True`, line 298 reshapes columns from
`(metric, category)` to `(category, metric)` before this transform runs.
`_apply_show_values_as` then treats each category as a metric and normalizes
across different metrics, so percent-of-row/total values are wrong for combined
pivot layouts. Could this transform run before the reshape, or select the
actual metric level after it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]