Skip to main content
Level 4
Aug 5, 2024 9:37 AM UTC
Solved

Rounding a Number in Calculated Field

I have added a Calculated Field into a Custom Form to divide two numbers added into the Form. This is working as expected.

But I would like to be able to display this number as either a whole number or to one decimal place using the Round or Floor expressions but haven't been able to get it to work as per the instructions in the Documentation area. 

Below is a screenshot of the current data expression and I wonder if someone would be able to help adding in one of the above functions to this expression?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
skyehansen
skyehansenAccepted solution
Aug 5, 2024 7:11 PM UTC

ROUND([your DIV calculation goes here],1)

4 replies

Rafal_Bainie
Community Advisor
Community Advisor
Aug 5, 2024 10:41 AM UTC

Round expression has 2 arguments: number itself & number of decimal places,e.g.

it works pretty well, although I vaguely recall I had some issues with rounding in the past that I don't remember clearly

 

Translate
ThomasNe2Author
Level 4
Aug 5, 2024 12:41 PM UTC

Hi Rafal - the number in this field differs with each Request submitted so I am unsure how to stipulate the actual number before the number of decimal places? 

 

Translate
skyehansen
Adobe Champion and Community Advisor
skyehansenAdobe Champion and Community AdvisorAccepted solution
Aug 5, 2024 7:11 PM UTC

ROUND([your DIV calculation goes here],1)

Translate
ThomasNe2Author
Level 4
Aug 6, 2024 1:18 PM UTC

Thanks for this Skye! I didn't realise I'd have to go back in and amend the details to get the values in the Calculated Field to update but this is working correctly now thank you!

 

Translate