Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Computed Fields - Decimal Places

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Kedevlin
665 Views, 2 Replies

Computed Fields - Decimal Places

How can I limit the number of decimal places that show in a computed field? 

 

The computed field is an "Integer" Data Type.  The Computed FIeld Formula multiplies data entered in another field that is a "Float" Data Type (limited to 2 decimal places) against a conversion rate.  For some reason the resulting number as many as 15 decimal place (ex., 1208.024000000000000).  I would expect it to either not have decimal places (based on the Integer data type of the computed field) or have 2 decimal places (based on the field it is pulling data from).

 

I tried converting the computed field to a Float Data Type because I can limit the decimal places on those, but I get the attached error when I try to do that.  Keeping it as an integer, the only option I know of is to limit the field length, but that would not limit the number of decimal places consistently. 

 

2 REPLIES 2
Message 2 of 3
broepke
in reply to: Kedevlin

You can round the result right in the computed field.  This is an example I had...

 

(round(QUOTED_PRICE - ACTUAL_COST, 2))

 

Hope that helps.

 

(the red is the field names and a little math)



Brian Roepke
Director, Analytics & Insights
Message 3 of 3
gasevsm
in reply to: Kedevlin

Yes, round(v numeric, s int) should address your needs as Brian outlined. For future reference, PostreSQL's math functions are documented here. http://www.postgresql.org/docs/9.3/static/functions-math.html

 

If you wish to not round out every digit to nearest value, you may consider using NUMERIC(precision, scale) for numeric types as outlined here. NOTE that scale of 0 represents an integer. http://www.postgresql.org/docs/9.3/static/datatype-numeric.html

 

Hope this helps too,


Martin Gasevski | Fusion 360 Team Product Manager

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report