-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Description
Bug description
I found another minor issue with "Export to Pivoted Excel" for pivot tables, this time related to percentage values that contain decimals.
Related to #38555
Steps to reproduce
- Create a Pivot Table chart.
- Use a metric that returns percentage values.
- Set the chart Value format to ,.2~%.
- Click Download -> Export to Pivoted Excel.
- Open the exported file in Excel.
Expected behavior
Percentage values should be exported consistently as numeric values already scaled for Excel percentage formatting.
For example:
- 2% should be exported as 0,02
- 43,66% should be exported as 0,4366
Actual behavior
Percentage values without decimals are converted correctly (2% becomes 0,02).
However, percentage values with decimals are exported as the raw number instead of being divided by 100.
For example:
43,66% becomes 43,66 instead of 0,4366
If the column type is then changed to Percentage in Excel, those values are multiplied by 100, which leads to inconsistent results within the same exported column.
Screenshots/recordings
Superset version
6.0.0
Python version
3.10
Node version
I don't know
Browser
Firefox
Additional context
The chart Value format is set to:
,.2~%
I am using the chart-level value format because setting a percentage D3 format in the dataset metric configuration does not to work in pivot tables.
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

