Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.
Add this skill
npx mdskills install sickn33/kpi-dashboard-designComprehensive dashboard design patterns with extensive KPI examples, SQL queries, and visualization layouts
1---2name: kpi-dashboard-design3description: Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns. Use when building business dashboards, selecting metrics, or designing data visualization layouts.4---56# KPI Dashboard Design78Comprehensive patterns for designing effective Key Performance Indicator (KPI) dashboards that drive business decisions.910## Do not use this skill when1112- The task is unrelated to kpi dashboard design13- You need a different domain or tool outside this scope1415## Instructions1617- Clarify goals, constraints, and required inputs.18- Apply relevant best practices and validate outcomes.19- Provide actionable steps and verification.20- If detailed examples are required, open `resources/implementation-playbook.md`.2122## Use this skill when2324- Designing executive dashboards25- Selecting meaningful KPIs26- Building real-time monitoring displays27- Creating department-specific metrics views28- Improving existing dashboard layouts29- Establishing metric governance3031## Core Concepts3233### 1. KPI Framework3435| Level | Focus | Update Frequency | Audience |36| --------------- | ---------------- | ----------------- | ---------- |37| **Strategic** | Long-term goals | Monthly/Quarterly | Executives |38| **Tactical** | Department goals | Weekly/Monthly | Managers |39| **Operational** | Day-to-day | Real-time/Daily | Teams |4041### 2. SMART KPIs4243```44Specific: Clear definition45Measurable: Quantifiable46Achievable: Realistic targets47Relevant: Aligned to goals48Time-bound: Defined period49```5051### 3. Dashboard Hierarchy5253```54├── Executive Summary (1 page)55│ ├── 4-6 headline KPIs56│ ├── Trend indicators57│ └── Key alerts58├── Department Views59│ ├── Sales Dashboard60│ ├── Marketing Dashboard61│ ├── Operations Dashboard62│ └── Finance Dashboard63└── Detailed Drilldowns64 ├── Individual metrics65 └── Root cause analysis66```6768## Common KPIs by Department6970### Sales KPIs7172```yaml73Revenue Metrics:74 - Monthly Recurring Revenue (MRR)75 - Annual Recurring Revenue (ARR)76 - Average Revenue Per User (ARPU)77 - Revenue Growth Rate7879Pipeline Metrics:80 - Sales Pipeline Value81 - Win Rate82 - Average Deal Size83 - Sales Cycle Length8485Activity Metrics:86 - Calls/Emails per Rep87 - Demos Scheduled88 - Proposals Sent89 - Close Rate90```9192### Marketing KPIs9394```yaml95Acquisition:96 - Cost Per Acquisition (CPA)97 - Customer Acquisition Cost (CAC)98 - Lead Volume99 - Marketing Qualified Leads (MQL)100101Engagement:102 - Website Traffic103 - Conversion Rate104 - Email Open/Click Rate105 - Social Engagement106107ROI:108 - Marketing ROI109 - Campaign Performance110 - Channel Attribution111 - CAC Payback Period112```113114### Product KPIs115116```yaml117Usage:118 - Daily/Monthly Active Users (DAU/MAU)119 - Session Duration120 - Feature Adoption Rate121 - Stickiness (DAU/MAU)122123Quality:124 - Net Promoter Score (NPS)125 - Customer Satisfaction (CSAT)126 - Bug/Issue Count127 - Time to Resolution128129Growth:130 - User Growth Rate131 - Activation Rate132 - Retention Rate133 - Churn Rate134```135136### Finance KPIs137138```yaml139Profitability:140 - Gross Margin141 - Net Profit Margin142 - EBITDA143 - Operating Margin144145Liquidity:146 - Current Ratio147 - Quick Ratio148 - Cash Flow149 - Working Capital150151Efficiency:152 - Revenue per Employee153 - Operating Expense Ratio154 - Days Sales Outstanding155 - Inventory Turnover156```157158## Dashboard Layout Patterns159160### Pattern 1: Executive Summary161162```163┌─────────────────────────────────────────────────────────────┐164│ EXECUTIVE DASHBOARD [Date Range ▼] │165├─────────────┬─────────────┬─────────────┬─────────────────┤166│ REVENUE │ PROFIT │ CUSTOMERS │ NPS SCORE │167│ $2.4M │ $450K │ 12,450 │ 72 │168│ ▲ 12% │ ▲ 8% │ ▲ 15% │ ▲ 5pts │169├─────────────┴─────────────┴─────────────┴─────────────────┤170│ │171│ Revenue Trend │ Revenue by Product │172│ ┌───────────────────────┐ │ ┌──────────────────┐ │173│ │ /\ /\ │ │ │ ████████ 45% │ │174│ │ / \ / \ /\ │ │ │ ██████ 32% │ │175│ │ / \/ \ / \ │ │ │ ████ 18% │ │176│ │ / \/ \ │ │ │ ██ 5% │ │177│ └───────────────────────┘ │ └──────────────────┘ │178│ │179├─────────────────────────────────────────────────────────────┤180│ 🔴 Alert: Churn rate exceeded threshold (>5%) │181│ 🟡 Warning: Support ticket volume 20% above average │182└─────────────────────────────────────────────────────────────┘183```184185### Pattern 2: SaaS Metrics Dashboard186187```188┌─────────────────────────────────────────────────────────────┐189│ SAAS METRICS Jan 2024 [Monthly ▼] │190├──────────────────────┬──────────────────────────────────────┤191│ ┌────────────────┐ │ MRR GROWTH │192│ │ MRR │ │ ┌────────────────────────────────┐ │193│ │ $125,000 │ │ │ /── │ │194│ │ ▲ 8% │ │ │ /────/ │ │195│ └────────────────┘ │ │ /────/ │ │196│ ┌────────────────┐ │ │ /────/ │ │197│ │ ARR │ │ │ /────/ │ │198│ │ $1,500,000 │ │ └────────────────────────────────┘ │199│ │ ▲ 15% │ │ J F M A M J J A S O N D │200│ └────────────────┘ │ │201├──────────────────────┼──────────────────────────────────────┤202│ UNIT ECONOMICS │ COHORT RETENTION │203│ │ │204│ CAC: $450 │ Month 1: ████████████████████ 100% │205│ LTV: $2,700 │ Month 3: █████████████████ 85% │206│ LTV/CAC: 6.0x │ Month 6: ████████████████ 80% │207│ │ Month 12: ██████████████ 72% │208│ Payback: 4 months │ │209├──────────────────────┴──────────────────────────────────────┤210│ CHURN ANALYSIS │211│ ┌──────────┬──────────┬──────────┬──────────────────────┐ │212│ │ Gross │ Net │ Logo │ Expansion │ │213│ │ 4.2% │ 1.8% │ 3.1% │ 2.4% │ │214│ └──────────┴──────────┴──────────┴──────────────────────┘ │215└─────────────────────────────────────────────────────────────┘216```217218### Pattern 3: Real-time Operations219220```221┌─────────────────────────────────────────────────────────────┐222│ OPERATIONS CENTER Live ● Last: 10:42:15 │223├────────────────────────────┬────────────────────────────────┤224│ SYSTEM HEALTH │ SERVICE STATUS │225│ ┌──────────────────────┐ │ │226│ │ CPU MEM DISK │ │ ● API Gateway Healthy │227│ │ 45% 72% 58% │ │ ● User Service Healthy │228│ │ ███ ████ ███ │ │ ● Payment Service Degraded │229│ │ ███ ████ ███ │ │ ● Database Healthy │230│ │ ███ ████ ███ │ │ ● Cache Healthy │231│ └──────────────────────┘ │ │232├────────────────────────────┼────────────────────────────────┤233│ REQUEST THROUGHPUT │ ERROR RATE │234│ ┌──────────────────────┐ │ ┌──────────────────────────┐ │235│ │ ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁▂▃▄▅ │ │ │ ▁▁▁▁▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁ │ │236│ └──────────────────────┘ │ └──────────────────────────┘ │237│ Current: 12,450 req/s │ Current: 0.02% │238│ Peak: 18,200 req/s │ Threshold: 1.0% │239├────────────────────────────┴────────────────────────────────┤240│ RECENT ALERTS │241│ 10:40 🟡 High latency on payment-service (p99 > 500ms) │242│ 10:35 🟢 Resolved: Database connection pool recovered │243│ 10:22 🔴 Payment service circuit breaker tripped │244└─────────────────────────────────────────────────────────────┘245```246247## Implementation Patterns248249### SQL for KPI Calculations250251```sql252-- Monthly Recurring Revenue (MRR)253WITH mrr_calculation AS (254 SELECT255 DATE_TRUNC('month', billing_date) AS month,256 SUM(257 CASE subscription_interval258 WHEN 'monthly' THEN amount259 WHEN 'yearly' THEN amount / 12260 WHEN 'quarterly' THEN amount / 3261 END262 ) AS mrr263 FROM subscriptions264 WHERE status = 'active'265 GROUP BY DATE_TRUNC('month', billing_date)266)267SELECT268 month,269 mrr,270 LAG(mrr) OVER (ORDER BY month) AS prev_mrr,271 (mrr - LAG(mrr) OVER (ORDER BY month)) / LAG(mrr) OVER (ORDER BY month) * 100 AS growth_pct272FROM mrr_calculation;273274-- Cohort Retention275WITH cohorts AS (276 SELECT277 user_id,278 DATE_TRUNC('month', created_at) AS cohort_month279 FROM users280),281activity AS (282 SELECT283 user_id,284 DATE_TRUNC('month', event_date) AS activity_month285 FROM user_events286 WHERE event_type = 'active_session'287)288SELECT289 c.cohort_month,290 EXTRACT(MONTH FROM age(a.activity_month, c.cohort_month)) AS months_since_signup,291 COUNT(DISTINCT a.user_id) AS active_users,292 COUNT(DISTINCT a.user_id)::FLOAT / COUNT(DISTINCT c.user_id) * 100 AS retention_rate293FROM cohorts c294LEFT JOIN activity a ON c.user_id = a.user_id295 AND a.activity_month >= c.cohort_month296GROUP BY c.cohort_month, EXTRACT(MONTH FROM age(a.activity_month, c.cohort_month))297ORDER BY c.cohort_month, months_since_signup;298299-- Customer Acquisition Cost (CAC)300SELECT301 DATE_TRUNC('month', acquired_date) AS month,302 SUM(marketing_spend) / NULLIF(COUNT(new_customers), 0) AS cac,303 SUM(marketing_spend) AS total_spend,304 COUNT(new_customers) AS customers_acquired305FROM (306 SELECT307 DATE_TRUNC('month', u.created_at) AS acquired_date,308 u.id AS new_customers,309 m.spend AS marketing_spend310 FROM users u311 JOIN marketing_spend m ON DATE_TRUNC('month', u.created_at) = m.month312 WHERE u.source = 'marketing'313) acquisition314GROUP BY DATE_TRUNC('month', acquired_date);315```316317### Python Dashboard Code (Streamlit)318319```python320import streamlit as st321import pandas as pd322import plotly.express as px323import plotly.graph_objects as go324325st.set_page_config(page_title="KPI Dashboard", layout="wide")326327# Header with date filter328col1, col2 = st.columns([3, 1])329with col1:330 st.title("Executive Dashboard")331with col2:332 date_range = st.selectbox(333 "Period",334 ["Last 7 Days", "Last 30 Days", "Last Quarter", "YTD"]335 )336337# KPI Cards338def metric_card(label, value, delta, prefix="", suffix=""):339 delta_color = "green" if delta >= 0 else "red"340 delta_arrow = "▲" if delta >= 0 else "▼"341 st.metric(342 label=label,343 value=f"{prefix}{value:,.0f}{suffix}",344 delta=f"{delta_arrow} {abs(delta):.1f}%"345 )346347col1, col2, col3, col4 = st.columns(4)348with col1:349 metric_card("Revenue", 2400000, 12.5, prefix="$")350with col2:351 metric_card("Customers", 12450, 15.2)352with col3:353 metric_card("NPS Score", 72, 5.0)354with col4:355 metric_card("Churn Rate", 4.2, -0.8, suffix="%")356357# Charts358col1, col2 = st.columns(2)359360with col1:361 st.subheader("Revenue Trend")362 revenue_data = pd.DataFrame({363 'Month': pd.date_range('2024-01-01', periods=12, freq='M'),364 'Revenue': [180000, 195000, 210000, 225000, 240000, 255000,365 270000, 285000, 300000, 315000, 330000, 345000]366 })367 fig = px.line(revenue_data, x='Month', y='Revenue',368 line_shape='spline', markers=True)369 fig.update_layout(height=300)370 st.plotly_chart(fig, use_container_width=True)371372with col2:373 st.subheader("Revenue by Product")374 product_data = pd.DataFrame({375 'Product': ['Enterprise', 'Professional', 'Starter', 'Other'],376 'Revenue': [45, 32, 18, 5]377 })378 fig = px.pie(product_data, values='Revenue', names='Product',379 hole=0.4)380 fig.update_layout(height=300)381 st.plotly_chart(fig, use_container_width=True)382383# Cohort Heatmap384st.subheader("Cohort Retention")385cohort_data = pd.DataFrame({386 'Cohort': ['Jan', 'Feb', 'Mar', 'Apr', 'May'],387 'M0': [100, 100, 100, 100, 100],388 'M1': [85, 87, 84, 86, 88],389 'M2': [78, 80, 76, 79, None],390 'M3': [72, 74, 70, None, None],391 'M4': [68, 70, None, None, None],392})393fig = go.Figure(data=go.Heatmap(394 z=cohort_data.iloc[:, 1:].values,395 x=['M0', 'M1', 'M2', 'M3', 'M4'],396 y=cohort_data['Cohort'],397 colorscale='Blues',398 text=cohort_data.iloc[:, 1:].values,399 texttemplate='%{text}%',400 textfont={"size": 12},401))402fig.update_layout(height=250)403st.plotly_chart(fig, use_container_width=True)404405# Alerts Section406st.subheader("Alerts")407alerts = [408 {"level": "error", "message": "Churn rate exceeded threshold (>5%)"},409 {"level": "warning", "message": "Support ticket volume 20% above average"},410]411for alert in alerts:412 if alert["level"] == "error":413 st.error(f"🔴 {alert['message']}")414 elif alert["level"] == "warning":415 st.warning(f"🟡 {alert['message']}")416```417418## Best Practices419420### Do's421422- **Limit to 5-7 KPIs** - Focus on what matters423- **Show context** - Comparisons, trends, targets424- **Use consistent colors** - Red=bad, green=good425- **Enable drilldown** - From summary to detail426- **Update appropriately** - Match metric frequency427428### Don'ts429430- **Don't show vanity metrics** - Focus on actionable data431- **Don't overcrowd** - White space aids comprehension432- **Don't use 3D charts** - They distort perception433- **Don't hide methodology** - Document calculations434- **Don't ignore mobile** - Ensure responsive design435436## Resources437438- [Stephen Few's Dashboard Design](https://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf)439- [Edward Tufte's Principles](https://www.edwardtufte.com/tufte/)440- [Google Data Studio Gallery](https://datastudio.google.com/gallery)441
Full transparency — inspect the skill content before installing.