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 :
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

    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…

Neeraj Kumar – Community Spotlight

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

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

#1
Martin Dráb Profile Picture

Martin Dráb 45 Most Valuable Professional

#2
iampranjal Profile Picture

iampranjal 36

#3
Satyam Prakash Profile Picture

Satyam Prakash 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans