# The find max value challenge

**URL:** <https://community.hubspot.com/t/the-find-max-value-challenge/92404>\
**Category:** 💬 RevOps Discussions\
**Tags:** revops\
**Created:** [October 23, 2023, 4:16pm UTC](https://community.hubspot.com/t/the-find-max-value-challenge/92404 "2023-10-23T16:16:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RAP\_ELISA](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rap_elisa/32/17330_2.png) [@RAP\_ELISA](https://community.hubspot.com/u/RAP_ELISA)\
**Post date:** [October 23, 2023, 4:16pm UTC](https://community.hubspot.com/t/the-find-max-value-challenge/92404/1 "2023-10-23T16:16:32Z")

</div>

Our custom object has a property named “MRR”, that obviusly change over time.

I am looking for a way to create a property on same custom object that presents the max value seen of the MRR property.

Any ideas?

I have seen advise to use custom code action in workflows, but hope for a solution that do not requirre coding skills or perhaps a piece of code that can do the magic.

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [October 24, 2023, 9:19am UTC](https://community.hubspot.com/t/the-find-max-value-challenge/92404/2 "2023-10-24T09:19:55Z")

</div>

Hi [@RAP\_ELISA](https://community.hubspot.com/t5/user/viewprofilepage/user-id/288413), I hope that you are well!  
Thank you for reaching out to the Community!  
The “max” feature is not natively present, so this would indeed require custom code.  
Otherwise, as a workaround, you could add the custom property on the custom object index page (when clicking the “edit column”, you will be able to add the property), then at the top of the column, you can sort by ascending or descending order to see the max value for this property (see screenshot below).

 ![sort_by_HubSpot.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/b/3b5cdf4332ada1878b2e7b5b6a2bb535168ea8a6.png)

Also, for you to know, there is a “max” option (that “displays the maximum value for the selected number property on all associated records of the selected object.”) if you create a calculated property based on properties of associated records, but this is not exactly what you are looking for I believe. [Here is the article](https://knowledge.hubspot.com/crm-setup/create-calculation-properties#calculate-values-based-on-properties-of-associated-records) about it in case you are interested in it.  
I’d like to ask some of our top experts on this: Hi @johnelmer, @SNigam and @Franci do you have any tips on how to achieve this, please?  
**Also, if anybody else has anything to add and/or share, please feel free to join in the conversation 🙂**  
Thank you and have a great day!  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![Maciek-Magic](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Maciek-Magic](https://community.hubspot.com/u/Maciek-Magic)\
**Post date:** [October 25, 2023, 8:11am UTC](https://community.hubspot.com/t/the-find-max-value-challenge/92404/3 "2023-10-25T08:11:05Z")

</div>

Hi,

how I would do it.  
I would add new Custom Property to Custom Object and name it Max MMR.

Set a workflow for this Custom Object, and set a trigger type “When an event occurs” → Property value changed and chose MMR  
Whenever MMR will change I would run script with following logic  
Get MMR

Get Max MMR

compare new **MMR** with **Max MMR**

if **MMR** \> **Max MMR**

set new Max MMR with MMR value  
if not bigger then do nothing.

If you need help with script let me know.
