Forum Documentation Showcase Pricing Learn more

Best Intersect between 2 lists


I have several “accounts”. Each account has a “list of categories”. I want to select an account and get the other account for which the intersect of their “list of categories” returns the maximum count. However, I’m stuck.

I am able to get a filter in place with the intersect count >0 but am not able to get the account whose list of categories has more in common with the current account.

Can anyone help me out?

I too would be interested in this, so that when a user searches for something, they also get “similar to” results. This for me would be a down the road feature, so I haven’t spent any time on it, but I imagine the logic would be something like returning a list of items where categories intersect, and then sorting by a count of the # of intersecting categories. But in Bubble’s “sort by” function, it just provides a list of datatype fields, rather than access to logic. There must be a way though.