Axis Expression Evaluations working with Filtering – Dynamic Bins and Rankings

Reading Time: 2 minutes

This tip will show you how to have ranking and binning functions, when used no an axis, that are dynamically evaluated after filtering. This feature was introduced in version 5.5

dynamicFilterAxis1

If you take a look at the following Bar Chart in 5.0. It has the Category Axis auto-binned to 5 bins for the ‘Days to Deliver’ column. We then filter the ‘Days to Deliver’ column, but the original bins persist, even though they are empty. This is because they are evaluated before filtering.

dynamicFilterAxis2

The same Bar Chart in 5.5 with the ‘Evaluate axis expression on:’ option set to ‘Current filtering only’ will recalculate the bins.

dynamicFilterAxis5

Another use for this feature is to update ranking dynamically on the axis after filtering. Assume you want to create a Pareto-like chart using the Combination Chart to show sum of sales for each store location. You would want the Bars for each Store Location to be displayed in order from highest sales to lowest sales and then you want the line on the Combination Chart to show the Cumulative Sum.

This ends up looking like the chart below.

dynamicFilterAxis6

However, when you start filtering, the ranking will not be re-evaluated. In the example below, we filter to remove all Males from the dataset.

dynamicFilterAxis3

You can see the Combination Chart updates to show the Bars sorted in order, but the ranking does not re-evaluate and the Line Chart uses the original ranking for its calculation.

By setting the ‘Evaluate axis expression’ to ‘Current Filtering Only’, we can get the desired effect of a dynamic Pareto chart, which evaluates the expression after filtering.

dynamicFilterAxis4