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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Rounding down a calcul...
Power Apps
Unanswered

Rounding down a calculated column

(0) ShareShare
ReportReport
Posted on by

Hello! I'm trying to add an Age column to my Customers table. I have each customer's date of birth in a column DOB as a date. 

My primary goal is to have age display accurately as a year, and as a whole number, but so far I have not been able to do both at once. 

 

alexiscool3104_0-1666845316530.png

The Age column is a calculated text column with the following formula:

DiffInMonths(velrada_dob, Now()) / 12

It returns the correct year, but has a decimal, which I do not want. 

 

The Age in Years column is a calculated decimal column, with 0 decimal places and with the following formula:

DiffInMonths(velrada_dob, Now()) / 12

It returns the rounded year, which is not the correct age as per the date of birth 50% of the time. It is the year closest to the date of birth. Sometimes it's correct (line 3), and sometimes it's wrong (line 1). Same thing happens with the same formula on a whole number column. 

 

The Age in Years 2 column is a formula column (decimal automatically) with the following formula:

Trunc(DateDiff(DOB,'Now Datetime')/365)
It has the correct year, and the decimal places are 0, but they're still there! That's the only problem, I want it to be a whole number. Same things happen with the following:
RoundDown(DateDiff(DOB,'Now Datetime')/365)
Int(DateDiff(DOB,'Now Datetime')/365)
 
What can i do to get a rounded down value without decimal places?

 

 

I have the same question (0)
  • AhmedSalih Profile Picture
    6,678 Moderator on at

    Hello, @Anonymous, you will have to use the Dataverse Formula Columns to use the Round function with is not available in the calculated column: the feature is in Preview, so you can use by using this url in your environment link:

    make.preview.powerapps.com

     

     

    If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


    I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


    Visit my Blog: www.powerplatformplace.com


     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard