MIP Logo

Creating an animated bar graph using Table Calcs using Pages Shelf : Ranking of Sales grouped by State

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

Here’s a snapshot of what we are going to create.

Cool, Isn’t it? So, let’s see how we can animate a bar graph like this.

Step 1:

As we are going to rank the sales by state, let’s drag the ‘Sales’ to Rows. As it is a measure you will see that it has been automatically aggregated by ‘SUM’ as SUM(Sales)

Step 2:

Now let’s add the state/province to the label. You will get a view like this.

Step 3:

Alright, now let’s add a ‘Table Calculation’ to rank the states by sales. Here, simply we can add a ‘Quick Table Calculation with Rank.” The below snapshot shows the view after applying ‘Rank’.

Step 4:

Next, we let’s go to the ‘Edit Table Calculation’ and use the option to Compute using Specific Dimensions. Calculating by a certain dimension can provide you greater flexibility, for example, if the dimension you’re using is on the marks card rather than the rows or columns. Here we will compute the rank by State/province.

Step 5:

As the next step, will make the SUM(Sales) with table calculations to ‘Discrete’ to make it to the the row headings.

Step 6:

As the next step, let’s drag the ‘Sales’ to Columns to view the bars for each state and it will be by default aggregated to ‘Sum(Sales)’.

Step 7:

Finally, we can add the ‘Order Date’ to Pages shelf to animate the bar graph by order date.

 

 

 

Share this post