How it works…

The Aggr provides the Country dimension necessary according to Rank() to virtually create a sales ranking by country. The If condition is used to filter Customers with the rank result below or equal to 5. These are the top five countries.

We used concat() to concatenate the result of Aggr in a single row in the first parameter. The second parameter is the separator between each result, and the third parameter defines the weight to sort the concatenation. The third parameter requires a field to weight the sorting; to use an expression, it has to be inside an Aggr().

To make the expression more readable, we can break each parameter of the expression into several lines.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset