Overview
The RELATEDTABLE function returns a table of all rows on the "many" side of a relationship that correspond to the current row on the "one" side. It is the inverse of RELATED: instead of fetching a single value, it returns an entire related table.
It is especially useful when you need to count, sum, or average child records per parent—such as orders per customer—without building a separate calculated column.