'Formatting metrics in Superset / Caravel pivot table
My Superset / Caravel pivot table slice is displaying the metrics (sum of revenue in this case) in scientific notation.
All 4.136578e+08 355190412.0 5.375492e+07 8.226031e+08
How do I display it nicely with thousands separator?
I cant find any options to specify Number Format for Pivot Table visualization type. In contrast, when I create slice using Big Number type, there is option to specify Number Format where it accepts D3 number format. I cant find this for Pivot Table.
Solution 1:[1]
you can change it by :- select the table . edit the record . list the sql metrics. then choose the metric you can fill the D3 format with +, | +12,345.4321
Solution 2:[2]
You may changing number in D3 format, here's some guideline :
{
"decimal": ".",
"thousands": ",",
"grouping": [3],
"currency": ["$", ""],
"dateTime": "%a %b %e %X %Y",
"date": "%m/%d/%Y",
"time": "%H:%M:%S",
"periods": ["AM", "PM"],
"days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
"shortDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
"months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
"shortMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
}
Solution 3:[3]
It can be defined in your dataset edit panel, just like this:
then it can be displayed as you designed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ameer Salah Aldeen |
| Solution 2 | Claire |
| Solution 3 | Henry Ecker |

