Forum Academy Marketplace Showcase Pricing Features

How to abbreviate large numbers

How to write a conditional expression that abbreviates large numbers such as:
1,543,128 = 1.5m
33,764 = 33.7k

In Displaying large numbers - #2 by troy.roberge @testingwebdev2016 does a great job providing steps necessary but I am lost on step 2, “parsing the string to a number” in order to truncate down. It appears a number field cannot be truncated. @testingwebdev2016, would you, or anyone else, have any insight on how to accomplish this?

Thanks so much,
Jason

Hi @jasonturo ,

Please check below, hope you get it.

URL : Your Bubble app

1 Like

Thank you, @mani2726 . I will check it out. Appreciate the help.

Thanks for the help with the number abbreviation @mani2726 . Would you know how to abbreviate each and provide the next digit after a decimal to the user, when it is not a decimal in the number? For example:

10,720= 10.7K
36,680 = 36.7K
444,500= 444.5K
2,420,100 = 2.4M

Thanks so much!
Jason