AGGR
is the function that we will use to perform vertical calculations.
In this case, we are going to work out which country has the highest value, and calculate the percentage of other sales versus that highest value.
Load the following script:
LOAD * INLINE [ Country, City, Sales USA, San Diego, 24567 USA, Dallas, 54962 USA, New York, 67013 USA, Boston, 45824 UK, London, 64002 UK, Birmingham, 44291 UK, Manchester, 40320 Germany, Berlin, 52912 Germany, Frankfurt, 61832 Germany, Munich, 35812 Japan, Tokyo, 42137 Japan, Yokohama, 55832 Japan, Osaka, 37643 ];
Use the following steps to use AGGR
to calculate the percentage of the maximum: