Skip to main content

Notifications

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. 

  • 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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Product updates

Dynamics 365 release plans