In 2013, MIT neuroscientists found that you can understand an image in just 13 milliseconds. That’s about ten times faster than the blink of an eye.
This is why dashboards make sense. OK, you probably don’t need to know your quarterly sales figures within 13 milliseconds, but your brain is wired for vision. Representing ideas and concepts visually is the best way to get that information across. Your brain just groks things like this:
Your brain has trouble with things like this:
In 2016-to-date, our revenue is $32.7M, over our target of $30M. However, our net profit margin is down from 2015 from 14.5% to 12.5%, though our gross profit margin is up to 62.5% from 59.8% in 2015. Our return on equity is the lowest it has been in the past three years, at 49%, while our debt-to-equity ratio has been climbing and is now just over 50%.
You can understand the text description, but it takes longer and is less intuitive. If these numbers change every day, the numbers are all going to merge into a mess in your head.
Two other problems with the text version are:
But you can’t just slap some numbers into a visualization either– dashboards are hard to design as well. In fact, the one above isn’t very good:
So let’s go through how you build a KPI (Key Performance Indicators) dashboard, from planning, through choosing the right deployment, to building one to fit your needs to get the right business insights.
Every company runs on metrics. Metrics drive decision-making, and decision-making drives metrics.
There’s always a number you are trying to make go up, a ratio you need to go down, and a graph that needs to go up and to the right. KPI dashboards allow you to see that graph going up and to the right, and see those numbers change.
The first decision you need to make is, which numbers?
KPI performance dashboards aren’t about cramming every number in your business into a visualization. You need to think about:
Each type of dashboard focuses on specific aspects of a business and tracks relevant metrics to provide insights and inform decision-making. Here are some KPI dashboard guidelines for different dashboards in an organization:
Each of these templates revolves around metrics that aid decision-making for teams.
If you’ve decided you need a KPI dashboard, how are you going to build one?
There are a ton of options, ranging from the so-simple-you-probably-don’t-think-it’s-a-dashboard-but-it-is, through the SaaS tools that come up in sponsored ads when you google “KPI dashboard” to the build it from scratch with a team of engineers option.
Let’s go through each to see their benefits and the challenges with each.
So, yeah, Excel is really the OG dashboard. Microsoft Excel and Google Sheets are widely-used spreadsheet tools that allow you to create simple, but good, KPI dashboards. They offer basic data visualization options, like charts and graphs, and can be used for manual data entry or importing data from other sources. The main benefits of spreadsheet tools are:
The problems that you might face using spreadsheets for your KPI dashboarding are:
These are what you think of when you think of ‘dashboards.’ Enterprise-level tools like Tableau, Microsoft Power BI, and Qlik. They definitely provide more advanced capabilities for creating KPI dashboards:
But their problems are almost the inverse of a spreadsheet’s benefits:
These are the SaaS versions of the tools above. They are dedicated dashboard software, but built more for smaller teams and startups. Think Klipfolio, Geckoboard, Domo, and Cyfe.
Whereas BI tools can be involved in all types of data analysis, these focus specifically on creating and managing KPI dashboards. They work well because they have:
But they have some significant limitations:
All the previous options fit in the ‘buy’ bucket. You don’t have to build anything yourself. With data visualization libraries, you have to get your hands a little dirty.
For those with programming knowledge, using data visualization libraries, such as D3.js (JavaScript), Plotly (Python/R), or ggplot2 (R), can allow you to create highly customized and interactive KPI dashboards. The good things about these are:
The bad news is:
(you can read more about building dashboards in Python here.)
The final option is to roll your own. You can choose to develop your own KPI dashboards using in-house engineers or by hiring external developers. This approach offers the highest level of customization but may also require significant time and investment. You get:
The downsides are:
Let’s run through how you can make a KPI dashboard. We’ll be using Hex. You can use Hex to build flexible and modern KPI dashboards easily, as they have both built-in visualizations and allow you to fully customize your dashboard with Python. Additionally, you can directly query any database or data warehouse with SQL queries.
We’ll work through a brief introduction to the company metrics dashboard from our gallery:
In this case our dashboard is a sales dashboard. We’re using data from a restaurant to understand current sales performance and use this information to make decisions about what to add to the menu.
Notice that this does three things a good KPI dashboard does:
In our example, the data is in a Snowflake warehouse. We’ll use a SQL query to connect to the database and query the data:
SELECT o.order_id,
o.user_id,
o.status,
o.created_at,
o.returned_at,
o.shipped_at,
o.delivered_at,
oi.product_id,
oi.inventory_item_id,
oi.sale_price
FROM demo_data.ecommerce.orders o
left join demo_data.ecommerce.order_items oi on oi.order_id = o.order_id
WHERE o.status != 'Cancelled'
GROUP BY 1,2,3,4,5,6,7,8,9,10
Now we’ve pulled our data we can continue to use order_items
to query against (we call this Chained SQL). This is simpler and less expensive than having to perform multiple queries to the warehouse or write subqueries.
Let’s go back and roll up the data for the last 30 days:
SELECT date_trunc(day,created_at) as day,
count(distinct order_id) as orders,
sum(sale_price) as sales
FROM orders_items
WHERE returned_at is null
and created_at >= DATEADD(day,-30,CURRENT_TIMESTAMP)
group by 1
order by 1
And then do the same for the 30 days previous:
SELECT date_trunc(day, created_at) as day,
count(distinct order_id) as orders,
sum(sale_price) as sales
FROM orders_items
WHERE returned_at is null
and created_at <= DATEADD(day,-60,CURRENT_TIMESTAMP) and created_at > DATEADD(day,-31,CURRENT_TIMESTAMP)
group by 1
order by 1
We can then sum up those values into variables:
orders_total = int(thirty_day_orders['ORDERS'].sum())
sales_total = thirty_day_orders['SALES'].sum()
prev_orders = int(prev_period_orders['ORDERS'].sum())
prev_total = prev_period_orders['SALES'].sum()
Then we can use built-in value visualizations to visualize orders_total
and sales_total
and work out the delta between this month and last month:
Two things to notice about this. Firstly, it is better UX than the Klipfolio example at the top. Here it’s clear what the headline number is and clear what the change since last month is.
Secondly, did you notice the switch in the code above? We went from SQL to pull and parse the initial data from our warehouse, to Python to analyze the data. Hex is polyglot, so you can work in SQL when it makes sense (usually when interacting directly with a database or warehouse) and Python when it makes sense (when analyzing and visualizing data). You don’t have to do any SQL-in-Python mashups to get data into a form that can be analyzed.
Once we‘ve pulled the data from our warehouse, we can easily graph it out to better understand it. For instance, graphing out sales through time pulls out a spike in sales around the holiday period (with a correlated spike in returns).
This is the kind of trend that it wouldn’t be as easy to spot if you were just tabling the data. Another example of difficult-to-comprehend data is location data. This type of data only makes sense when it’s mapped. We can do that with a built-in map visualization in Hex:
This actually shows the backend view, where you can choose the data to graph and customize it how you need. When you publish this app, it looks like this, along with the context:
An added bonus of using Hex to build a KPI dashboard is that you can easily publish it for your team to see. You can also easily refresh the data for each variable or chart for automated reporting.
Copy the app yourself to play around with this dashboard and use it as a KPI dashboard template for your own team.
It's easy to get caught up in pixel-perfection, but remember: dashboards are a decision-making tool.
They can be simple or complex depending on need, and as beautiful or sparse as you can make it. But the data always takes center stage. Your focus when building one should always be “does this help drive the organization forward?”
The best KPI dashboards do this well.