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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Calculated field - Max function?

(0) ShareShare
ReportReport
Posted on by 76

Is there a way to create a calculated field that will give me the maximum value of four fields on the table (entity)?  I have four fields, all defined as Whole Number fields, and I'd like to create a calculated field that will track the highest value entered in any of the four fields.  In other words, the equivalent of the MAX(number1, [number2], ...) function in Excel. I know that I could create a Business Rule that would update a custom, Simple field type (not Calculated) Whole Number fields using a bunch of IF statements - OR - use JavaScript to do the same thing...  But it seems like I should be able to do this with a calculated field.  This is in Dynamics 365 online. 

I have the same question (0)
  • Verified answer
    Wahaj Rashid Profile Picture
    11,321 on at
    RE: Calculated field - Max function?

    Hi,

    Thank you for your query.

    Currently, calculated fields do not support MAX function.

    Only supported functions are:

    ADDHOURSADDDAYSADDWEEKSADDMONTHSADDYEARSSUBTRACTHOURSSUBTRACTDAYSSUBTRACTWEEKSSUBTRACTMONTHSSUBTRACTYEARSDIFFINDAYSDIFFINHOURSDIFFINMINUTESDIFFINMONTHSDIFFINWEEKSDIFFINYEARSCONCATTRIMLEFT, and TRIMRIGHT.

    Define calculated fields | Microsoft Docs

    Apart from Business Rules, you can write a plugin to get the Max value.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 338

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 137 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 87 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans