How to calculate 'MODE' of child records?

  • 0
  • 1
  • Question
  • Updated 5 months ago
  • Answered
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.
Photo of David Brogdon

David Brogdon

  • 1,222 Points 1k badge 2x thumb

Posted 5 months ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,904 Points 50k badge 2x thumb
You would need to hope Dan Dielbolt sees this question as it will need a  non native solution.
Photo of David Brogdon

David Brogdon

  • 1,222 Points 1k badge 2x thumb
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. 
(Edited)
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,204 Points 20k badge 2x thumb
I am very short time so follow with questions if you wish:



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


(Edited)