Skip to main content
Question

Abbreviated Number with same number of decimals?

  • July 26, 2023
  • 9 replies
  • 19 views

jonas.schei12
Level 5
Forum|alt.badge.img

Dear all,

I would like to have the same number of decimals for different abbreviated key figures.

With ".3s" I can only define the total number of digits, but I would like to define the number of decimal places for an abbreviated number.

With ".3s" -> 8.07k .... 17.0k but I want: 8.07k ... 17.01k

 

Thanks in advance!

 

Best,

Jonas

9 replies

Hmmm, maybe with some try and error using this info:

https://docs.celonis.com/en/number,-date,-and-time-formatting.html

 

something like ,.4r2f? No idea if it will work....

 

Best luck!


jonas.schei12
Level 5
Forum|alt.badge.img

Hi Guillermo,

thanks a lot for your quick reply.

Unfortunately this does not work. Combinations of the number formats generally do not seem to work. Does anyone else have an idea?

 

Thanks in advance!


Hi Guillermo,

thanks a lot for your quick reply.

Unfortunately this does not work. Combinations of the number formats generally do not seem to work. Does anyone else have an idea?

 

Thanks in advance!

Well, a "workaround" would be to convert it to string and format it as you please....


kailash.potha12
Level 10
Forum|alt.badge.img+6

@Jonas Scheidel - Try this format .3~s


jonas.schei12
Level 5
Forum|alt.badge.img

Thanks @kailash.potha12  I have tried this already but also doesn't work.


marco.marso
Level 6
Forum|alt.badge.img
  • Level 6
  • July 28, 2023

Hello,

 

have you already tried it this way ',.2f' ? Granting that you want the comma as thousands seperator..

 

BR,

Marco


jonas.schei12
Level 5
Forum|alt.badge.img

Hello @marco.marso 

thanks for your reply. But with  ',.2f' you lose the format for abbreviation -> target format: 8.07k or 17.01k or 100.25k .... -> same Number of Decimals + Abbreviation (k)

Best,

Jonas


marco.marso
Level 6
Forum|alt.badge.img
  • Level 6
  • July 28, 2023

Hello @marco.marso 

thanks for your reply. But with  ',.2f' you lose the format for abbreviation -> target format: 8.07k or 17.01k or 100.25k .... -> same Number of Decimals + Abbreviation (k)

Best,

Jonas

ofc. my bad.


  • Level 8
  • July 28, 2023

Well, a "workaround" would be to convert it to string and format it as you please....

Is what I do as a workaround, here is the script I use:

 

CASE 

WHEN table.column < 1000000000000 AND table.column >= 1000000000 THEN  table.column/1000000000 || 'b' 

  WHEN table.column < 1000000000 AND table.column >= 1000000 THEN  table.column/1000000 || 'm'

  WHEN table.column < 1000000 AND table.column >= 1000 THEN  table.column/1000 || 'k'

  --WHEN table.column < 1000 AND table.column >= 0 THEN  table.column || 'u'

  ELSE table.column 

END

 

commented out the units as not needed.