*There are lots of GIFs in this article. They may be loading a bit slowly.
In this article, I am going to explain how to build a dynamic Data Dashboard with Tableau so that a user can select a metric and a year to evaluate the sales performance.
I will use the Tableau Public for this project which is free that you can simply download from here:
Problem Statement
The dataset I will use is provided by the Udacity Data Visualization course. It’s a sample superstore dataset and can be found here:
Based on the dataset, our goal is to build a dynamic dashboard. From the dashboard, a viewer should be able to learn the following insights:
- Top-level revenue, profit, profit ratio and units sold for the year.
- YoY (Year-Over-Year) performance by customer segment (customer segment refers to Corporate, Consumer, Home Office).
- View sub-category performance by the active metric (from revenue, profit, profit ratio and units sold).
- Best performing sub-categories within each customer segment for the chosen metric.
In total, there are four main steps to build this dashboard:
- First, format the top-level KPIs as BANs in Tableau.
- Then, visualize the YoY customer segment performance with a line plot.
- Then, visualize the YoY sub-category performance under each customer segment with a bar plot.
- Finally, define the metric and year user selection dropdowns.

*I renamed the Order Date column to Year. Sorry for the confusion may have in the following demo.
KPIs
Creating a BANs for the main KPIs such as profit, revenue, avg profit ratio and units sold, is always a good way to present your insights to a viewer who doesn’t know very much details of the dataset.
I will guide you step-by-step on how to create such a BANs in Tableau.

In the first part, I chose the KPIs that I want to include in my BANs first. Then, I dragged each of the measures to the Label in the Marks section. By default, Tableau assumes the aggregation is a sum of the measure. However, for the profit ratio, we would like to calculate the average instead of the sum. You could change it to average by right click on the aggregated measure in the Marks **** section.

In the second part, I created a Year filter by right click on the Year and select Show Filters. Then, by left clicking on the Text in the Marks section and selecting the three dots, we could change the font, size and color of the body text in the BANs.

Now, we have completed the KPIs section but you may find that a year filter is not the best way to control in the visualization. For example, if we have multiple sheets and each of them contains a year filter then the final dashboard would look very messy. Therefore, in the final section of the article, I will show you how to add custom selection dropdowns in Tableau by creating new parameters and calculated fields.
YoY Segment Performance
Besides the previous top-level insights, a viewer may want to have a further look into the YoY performance under each segment.
I will now guide you through the process of creating a line plot that meets the requirement.

You could also edit the color of the line plot by left clicking on the arrow of the SUM(Profit).
Back to the dashboard requirement, a viewer should also be able to see the performance by an active metric (from revenue, profit, profit ratio and units sold). As mentioned at the end of the KPIs section, we will create the active metric & year selection dropdowns in the final part of the article.
YoY Sub-category Performance
In this step, I will use bar plot to show the YoY sub-category level performance for each segment under the selected metric Profit.

Also, you could edit the bar plot color by clicking on the aggregated measure and select Edit Colors.
As you may find, in this graph, the year filter appears again and it already appeared in the previous two graphs. It’s not necessary to keep all three year filters for each graph in the final dashboard.
So now I will introduce how to build and connect the user selection dropdowns for both the year & metric (from revenue, profit, profit ratio and units sold) filters.
User Selection

The dropdowns we want to achieve will look like above in the final data dashboard. Two selection dropdowns, one is for the active metric and one is for the selected year.
Starting from the KPIs, we need to define the Select Year as a new parameter and Chosen Year as a new calculated field.

Since you can use the newly created parameter and calculated field in the other sheets, you could simply replace any year variables in your graph with the new Chosen Year and repeat the Show Parameter step. It should work well for the other two sheets as well.
Finally, we are creating the Select Metric, it’s actually easier than the Select Year.

Similar to the Select Year, the Select Metric parameter and __ the Chosen Measure calculated field can be found on the other sheets. Some differenece are the data types and the formulas within each filter.
Finally, to create a dashboard and adjust its layout, simply click the New Dashboard icon, drag the sheets you need and move them as your design.
My final dashboard looks like the following:

Summary
Designing a great data dashboard actually involves more than Data Science. Usually, we want to keep it both informative (insightful) and aesthetic. Sometimes, the size of text in each section, font style and colour have a huge impact on whether a viewer will like it and be willing to stay longer.
During the design, I found some great tools / websites that may help you create your own data dashboard. I will list them in the Inspiration section.
Thank you for your reading! Hope you like this article and find it helpful ~
Inspiration
Explore Other Dashboards on Tableau Public