great-tables icon indicating copy to clipboard operation
great-tables copied to clipboard

Add ability to format as accounting values (in `fmt_*()` methods where it makes sense)

Open rich-iannone opened this issue 1 year ago • 2 comments

We currently don't have the ability to format numeric values as accounting-type values (i.e., handling of negative values different than using the minus sign). This should ideally work inside:

  • fmt_number()
  • fmt_integer()
  • fmt_currency()
  • fmt_percent()

As for how it would look, this is a good start:

accounting_values

rich-iannone avatar Apr 11 '24 19:04 rich-iannone

Great Idea! 😃

Not sure if this is just to show the format but the "percent" value looks wrong 😄 . Most programms (like excel, powerbi, ...) multiply by 100 and not divide by 10 😮 .

For example you perform a calculation resulting in 0.15 and formatted as percent yields 15% (1 = 100%)

Julian-J-S avatar Apr 12 '24 07:04 Julian-J-S

I rescaled the number before applying the percent formatting (to put it in a better range).

rich-iannone avatar Apr 12 '24 12:04 rich-iannone