Finally we are here, the Dashboard week. A dashboard challenge each day. Day 1 we have the Global Power Plant dataset to work with. I’ll break this blog down into two parts to summarize the key things I did to make the dashboard for this analysis.

  • Data preparation

In the original dataset, there are columns based on different years.

These type of columns usually need to be transposed first in Alteryx to bring the years into row level data. Also for each year, there are three different types of data. Two of them will be needed in the dashboard. So the steps to prepare these data will be transpose first, then seperate the year, then create two data columns for each year by doing another crosstab.

The part of Alteryx workflow to complete this process is showed here.

  • Calculation in the dashboard

To finish the dashboard with necessary analysis, some calculations need to be done in the dashboard in Tableau. Here an example will be explained in detail. The worksheet in the dashboard is showed here. The key thing is to calculate the current year value, and compared it with previous year value, then get the percentage of increase or decrease based on the previous year value.

First, the calculattion will be based on country and year level of details, so to calculate the yearly co2 emission a LOD calculation is needed here whcih showed below:

The next step will calculate the co2 emission a year before this year. A table calculation function LOOKUP() can help us do this. Make sure to set the table calculation to be Table Across to get the correct result.

When we have these two years of co2 emission data, it will be easy to calculate the difference between them and get the percentage of either increasing or decreasing compared to the first year.

Notice that a MAX() or MIN() function needs to be added to the column for the second year calculation, because Tableau will take the first year calculation which is done by LOOKUP() function as an aggregated field.

Then based on this percentage of the co2 emission change data, we can further add colour coding to the chart by checking the change is positive or negative. This will conclude the creating of this co2 emission change worksheet.

The Data School
Author: The Data School