# Discussions

View Only

## How to calculate 'MODE' of child records?

• #### 1.  How to calculate 'MODE' of child records?

Posted 01-04-2019 20:21
I am curious if there is a way to write a formula that will calculate the Mode of the child records' specific field value.

For example, if I have 5 apartments and 2 have the same rent. If I wanted to get the most occuring rent value from apartments back up to the parent building.. ?

Thanks for any help.

• #### 2.  RE: How to calculate 'MODE' of child records?

Posted 01-04-2019 20:25
You would need to hope Dan Dielbolt sees this question as it will need a  non native solution.

• #### 3.  RE: How to calculate 'MODE' of child records?

Posted 01-04-2019 20:45
Yes, I sure hope he does. I mean, I can program the formula itself, logically. I just don't know how to interface it with QB to pull the values of the child records into an array.

Still though, I would have to account for multiple modes (bi-modal?) within my programming.

Hmm. Hope Dan has some insight.

• #### 4.  RE: How to calculate 'MODE' of child records?

Posted 01-06-2019 21:46
I am very short time so follow with questions if you wish:

">https://d2r1vs3d9006ap.cloudfront.net/s3_images/1770562/RackMultipart20190106-10599-q9i202-screenshot_inline.jpg?1546811979">

Honey Are You In The Mode Tonight? ~ List All Parents
https://haversineconsulting.quickbase.com/db/bpaurgqmp?a=td

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=718

Notes:

(1) Despite the mode being commonly reported as a number it is in fact a categorical measure not a numeric measure. To this point check out the Geek parent record

(2) I did not consider the case of multiple modes but that is easy to implement once you decide how you want to report a case with multiple modes.

If you need further assistance with this problem free to contact me off-world using the information in my profile:

https://getsatisfaction.com/people/dandiebolt