I want to write the following in a formula. I have a set of things A. Each of the things has its own set of things B_A, which are characterized by an area (m²). There is another variable, let's call it maximum allowed content k > 0. For each element of A I want to find the k-largest elements of B_A and then add those largest elements over A.
How do I write that?
Can I write the condition next to the formula as in the Example Formula