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.




The Data School
Author: The Data School