With a simple data set, we want to see the median (or mean) values and different percentile values across the whole data set. But quite often, we want to look for a particular dimension (for example, Month), at the median and percentiles of the totals for another dimension (for example, Country). So, rather than the median for the individual values (say Sales), which could be quite small or quite large, we want to see the median for the total value by the second dimension.
We can create this manually, but this can be achieved quickly using the Box Plot Wizard.
Load the following script:
LOAD * INLINE [ Country, Value, Month USA, 12, 2013-01-01 USA, 14.5, 2013-01-01 USA, 6.6, 2013-02-01 USA, 4.5, 2013-02-01 USA, 7.8, 2013-03-01 USA, 9.4, 2013-03-01 UK, 11.3, 2013-01-01 UK, 10.1, 2013-01-01 UK, 3.2, 2013-02-01 UK, 5.6, 2013-02-01 UK, 3.9, 2013-03-01 UK, 6.9, 2013-03-01 ];
Use the following steps to create a box plot using the wizard:
The wizard takes care of creating the expressions that will be needed for this box plot. In this case, where there is an "aggregator"; that dimension is used as part of an Aggr
expression.
There are two approaches to the box plot that can be achieved from the wizard: