Compare to a Selected Dimemsion

by Mary-Leena Tchenkoue

It is possible to use quick table calculations to display the difference or change in a quantity, e.g Sales, along a given axis. These table calculations can also be configured to compare to either the FIRST, LAST, NEXT or PREVIOUS point on the given axis. However, this configurations does not allow to compare a selected point to every other point on the axis. For this table calculations must be used in a calculated field. It is also possible to use LOD here. This method also allows to compare dimensions.

Let's use Superstore data and try to compare the profit of a selected subcategory to the profit of others, i.e, we want to know exactly the difference between their profits.

1. First we create a parameter (SubCat) for the Subcategory dimension and show the parameter.                                                                                                                           2. Using LOD calculation , we want to get the profit for this selected subcategory and put in in a new column so we can do a comparison to the other subcategories.

3. Create another calculated field to get the difference of profit between the selected Sub-Category and the others.

4. Create a parameter action that will update the parameter when you click on the Sub-Category you want to select or simply change it in the parameter button.           5. Now drag and drop the fields as in the view below.

The Last chart on your right allows to visualize the difference of profit of other Sub-Category items compared to a selected Sub-Category, 'Phones' in this example.

The selected bar is colored so that it stands out as the reference point. You can do this by dropping the calculation below onto color on the Marks card.

Now you can compare to a selected dimension. This also works for time dimensions.

Wed 01 Jun 2022

Mon 30 May 2022

Mon 07 Mar 2022