Changing the display of a number

Hi all,

Would anybody know an expression that would help to change a number?
For example:
16,484 to show as 16.5k ?

I would like the figure to be rounded to the nearest hundredth and then replace the last two digits with a “k”.

To mention that this would not replace the actual number field but be shown in a VC.

Thanks in advance,
Chris.

This is a rounding issue, I think. I think you will need a combination of dividing by 1000, rounding, and then using CONCATENATE() to and the “k”, etc. (perhaps not necessarily in that order). See the following discussion:

3 Likes

Maybe something like this, but is not very good looking since I am still learning to use numbers:

CONCATENATE(CEILING(10*(16,484/1000.0))/10.0,"k")
5 Likes

Please try this

CONCATENATE(DECIMAL(ROUND([ShortenNumber]/100.0)/10.0),“K”)

I believe this will work for a range from 50 to 99999

A number will last two digits lesser than 50 ( 1234 , 2345, 22335) will convert to earlier 100
A number with last two digits greater than 49 (1256, 2567, 45678) will convert to higher 100

The field [ShortenNumber] is the field that will contain numbers 50 to 99999

5 Likes

Hi guys,

I have tested all of these 3 solutions and all of them work great.

@Kirk_Masden’s solution of using the rounding to 500th worked but was a little too far out for me.

@Heru’s solution worked great also and so does the solution @Suvrutt_Gurjar suggested.

Results are below:

image

The solution I will go ahead and use is @Suvrutt_Gurjar’s as it is accurate and is just what I am looking for.

Thanks all for your suggestions and solutions.

Best,
Chris.

5 Likes

Hi @Chris_Jeal,

Good to know it meets your requirement. My request will be to test it well at your end as well , eventhough I also tested with around 15 odd different number combinations from 50 to 99999

2 Likes

Just have done, the numbers we work with will never reach the 99,999 so I’m pretty safe with this expression.

image

Looks great!

Thanks again.

3 Likes

Hi @Chris_Jeal, I really like this comparison. Thanks for sharing with us.

4 Likes