Bug Report: Watt, MilliWatt, kWatt, and MWatt units do not display correctly

I log watt and cumulative watthr reports in my database.

If I want to display units, I can pick Energy/Watts or Energy/WattHrs.
If I pick Watts, my result is divided by 1000 and kW is displayed. If I pick WattHrs, then my result is also divided by 1000 and “kWattHrs” are displayed. If I select kWhrs then MWhrs are displayed. Same with kW and MW. The math is correct only for kW or kWhrs because it divides by 1000, but it also divides by 1000 for milliwatt, and MWatt In all cases it doesn’t display the unit of my choice.

This happens in other panel types such as tables too. I haven’t been able to replace it with a custom unit to fix it because it just reverts back to those in the Energy list.


When you are using the grafana unit system and choose “Whr” it is like saying:

“Hey grafana, my input data is in ‘Whr’, can you display this data in the units you want?”

if you always want to see “Whr” as units, you should choose “none” as units and set ‘Whr’ as postfix


Thanks. I see that now and it works well in the Singlestat viz. In the Table viz however, there is no postfix option, but using the column header override gives satisfactory results. I suppose in a table it is more common to display the unit once in the header, and not with every value.