Learn how to calculate and visualise local variances of your market share with Alteryx.

Learn how to calculate and visualise local variances of your market share with Alteryx.

In our previous article, we measured how the market share of a Belgian company evolved between 2016 and 2017. In that analysis we concluded that there was no significant difference between the market share of both years at national level. Now we want to have a closer look at these evolutions with a local approach. To this aim, we propose to calculate the evolution of market share by postal code.

Prepare your data

First, we open the table of observed sales and estimated sales potential by year and by postal code (prepared in the previous newsletter). For each row (i.e. each combination of year and postal code) we calculate the market share by dividing the observed sales by the sales potential. Then, we use the Cross-tab tool to get the market share of both years as columns. We finally rename these two columns with understandable names.

Making histograms of the distribution of the market share evolution

Now, we want to analyse the evolution of the market share in all postal codes. To this aim, we calculate the market share increase. This is the difference between the market share in 2016 and 2017 divided by the market share of 2016. A value of 0 indicates that the market share of the postal code did not change between the years, positive values indicate increases and negative values indicate decreases.

To obtain a view of the statistical distribution of this variable, we use the tool Histogram in the Data Investigation toolbar. In a first try, we observe values ranging from -1 to 12,with a peak centered on 0. The figure is poorly readable as most of the observations are between -1 and +1. To overcome this problem, we use a Filter tool followed by another Histogram tool to zoom on this specific interval.

With the zoom, the peak looks rather symmetric around 0. In other words, there is no strong contrast between the occurrence and the magnitude of market share increases and decreases. This means that our global stagnation is not the consequence of such a thing as “a general decrease of the market share compensated by a very good local performance” or, on the contrary, “a general increase of the market share compensated by a very bad local performance”. The variations we observe between postal codes looks rather like normal fluctuations between years.

Exporting figures

Alteryx can save multiple tables or figures to a single report. To this aim, we connect the output of the two Histogram tools with a Union tool and then to a Render tool (Reporting toolbar). Each graph is therefore transported as an object through the workflow. Supported formats are typically PDF, HTML, XLSX, DOCX, PPTX, RTF and PNG (used here). We select the size of the figure in the Render tool (8 x 4 cm) to fit with the size of the two individual figures (4 x 4 cm).

Using interactive chart tools to get a better understanding of evolutions

In the previous histogram we observed a few postal codes with very high relative increase (> 1% to >100%). We believe that these occur because the sales potential is low and thus small fluctuations in sales volumes have a strong relative effect. Let us check this with a scatterplot of market share increase in function of sales potential.

First, we join the sales potential (2016) to the data flow containing market share increase by postal code. Using the Interactive Chart tool (Report toolbar), we build a plot element by element, in a so-called WYSIWYG (“what you see is what you get”) approach. Axis labels can be written manually. Afterwards, the graph will be saved as a report with the same render tool as previously.

The scatterplot shows that, as predicted, highest values of market share increase occur in postal codes where the sales potential is low. This confirms that small changes in sales volumes can have a big relative impact when the sales potential is small. The fact that the increase of market share converges to 1 as the potential increases is an indicator of overall stability of the market share between 2016 and 2017.

In our next article, we will map the increase of market share by postal code to check if we observe some geographic trend.