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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 60 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 43

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans