How to Create a KPI Card in Tableau
Creating Key Performance Indicator (KPI) cards in Tableau can be a powerful way to communicate essential information and track progress. These cards provide a concise, at-a-glance view of how your company's performance aligns with its goals. Here's a step-by-step guide on how to create a KPI card in Tableau.
Before we dive into the process, ensure you have a good understanding of Tableau's interface and basic functionalities. If you're new to Tableau, it's a good idea to familiarize yourself with its software by going through the learning resources available on their official website.
Preparing Your Data
Before creating your KPI card, make sure your data is clean and formatted correctly. KPIs are typically numerical, so examine your data to ensure all relevant fields are numeric.
For instance, if you're tracking sales, ensure the relevant data fields are formatted as numbers (not text). Also, verify that your data has no missing values or inconsistencies, as they can affect your KPI calculations.
Creating Calculations
Most KPIs require some level of calculation. In Tableau, you can create calculated fields using the 'Create Calculated Field' option under the 'Fields' menu. For example, if you want to show 'Sales Growth' (current sales - previous sales), you can create a calculation like this:
[Sales] - LAG([Sales], 1)
This will give you a new field that shows the difference between the current sales and the previous sales for each row in your dataset.
Setting Up Your Dashboard
Tableau's layout and design features allow you to create vivid and compelling KPI cards. Start by creating a new dashboard, and then drag and drop a 'Blank' object from the toolbar onto your dashboard. This will serve as the base of your KPI card.
Next, make sure your data source is attached to this dashboard object. You can do this by right-clicking on the object and selecting 'Attach Data Source' from the menu. Select the appropriate data source, and your fields will populate in the 'Fields' pane.
Creating the KPI Card
Now that your data and dashboard are set up, you can begin creating your KPI card.
First, add a 'Text' object to your dashboard. This will display the title of your KPI, such as 'Sales Growth'. Format the text as desired - choose a large font size, bold or italicize the text, or apply a specific color to make it stand out.
Displaying the KPI Value
Next, add a 'Text' object to display the actual KPI value. You can format this text in various ways as well. To ensure the text adjusts correctly in different dashboard sizes, reduce the text's auto-size setting from 100% to a smaller percentage.
Right-click on this text box and select 'Compute Using' from the context menu. Choose 'Table (down)' - this will ensure that the KPI value adjusts when you filter other parts of your dashboard. Now, manually input the calculated field you created earlier, and format the number (e.g., add commas, change the number of decimal places, or apply a certain currency symbol).
Adding Visual Elements
To make your KPI card more engaging, consider adding additional visual elements. A simple way to do this is to include a 'Shape' or 'Image' object. This could be a graphic related to your KPI, like a bar chart showing your sales growth over time or an image that represents your industry.
You can also add a 'Reference Line' to provide a benchmark against which to compare your KPI. For example, you could set a target sales growth rate, and highlight this with a horizontal reference line.
Formatting and Alignment
With your KPI card's elements in place, the final step is to format and align them properly.
Use the formatting options on the top toolbar to adjust the size, color, and other attributes of your text boxes. You can also adjust the size of your shape or image object by right-clicking on it and selecting 'Auto-size' from the context menu.
To align your KPI card's elements, hold down the 'Shift' key while selecting the objects you want to align. Then, use the alignment tools on the top toolbar to horizontally or vertically align them. This ensures your KPI card looks clean and professional.
Finally, don't forget to add a subtle call-to-action or a thought-provoking statement to encourage users to interact with your dashboard and delve deeper into the data. This could be a question, a suggestion to filter the data, or an invitation to explore other dashboards.