We know how to use several aggregation functions such as sum, max, min, and avg. When used in a measure of a chart or table, they aggregate values over the dimension stated in that chart or table.
Sometimes, you need to create a second aggregation based on the result of the first. An example could be the value and the name of the country with the most customers. This can be done using Aggr, combined with the Max() and Firstsortedvalue() functions.