How do you calculate formatted values | Community
Skip to main content
ReluctantProgrammer
Level 4
Aug 11, 2021 7:36 PM UTC
Solved

How do you calculate formatted values

I'm trying to calculate the total of 2 fields which have been formatted using math.floor; I want to calculate the formatted amount of these 2 fields, NOT the rawValue.  How can I do this?

 

example: 

Field 1 rawValue = 700.44                                    Field 1 formatted value = 700.4

Field 2 rawValue = .42                                          Field 2 formatted value = .4

Total rawValue  =  700.86 (rounded 700.9)          Total formatted value = 700.8 ;  this is what I need to do

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Asutosh_Jena_
Asutosh_Jena_Accepted solution
New Participant
Aug 12, 2021 2:14 AM UTC

Hi @reluctantprogrammer 

 

Try this:

(Math.round(700.44*10)/10)+(Math.round(0.42*10)/10);

Thanks!  

4 replies

Asutosh_Jena_
Asutosh_Jena_Accepted solution
New Participant
Aug 12, 2021 2:14 AM UTC

Hi @reluctantprogrammer 

 

Try this:

(Math.round(700.44*10)/10)+(Math.round(0.42*10)/10);

Thanks!  

Translate
ReluctantProgrammer
Level 4
Aug 12, 2021 12:20 PM UTC

Awesome!  I was soooo close.  Thanks so much!!

 

Translate