web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Removing decimals from a number in calculate string field

(0) ShareShare
ReportReport
Posted on by 7

I have a field that needs to show the duration in weeks or years (and specifically mention weeks or years) depending on what it is. So originally I created a string field / calculated that looks like this 

 but the result is this: 

now I don't want the many decimal places and after exhausting a few options of how to format it in a string, I decided to make another field, decimal / calculated - with 2 decimal places and then concat that into the string - 

but for whatever reasoning, the result is the same... with many a decimals. 

I have the same question (0)
  • Suggested answer
    Haig Liu Profile Picture
    Microsoft Employee on at
    Hi Megan Lisa,
    There is no need to set precision on single-line text fields; it is much simpler to split a calculated field into two parts.
    Please check the following steps:
    1.Because the calculated field cannot set a maximum and minimum value, I set the minimum value of the time field to 0 (I think the time cannot be a negative value).
    2.I store the results of the preliminary calculation in a decimal calculation field with precision set to 0.
    3.Create a single line text calculation field to process the preliminary calculation results obtained in the previous step.
    4.After confirming that it works correctly hide the middle calculation field.
     
     
    Best Regards,
    Haig Liu

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans