Dashboard creation for marketing KPIs in Digital Marketing - Time & Space Complexity
Start learning this pattern below
Jump into concepts and practice - no test required
When creating a marketing dashboard, it's important to understand how the time to update or load the dashboard changes as you add more data points or KPIs.
We want to know how the work grows when the dashboard handles more information.
Analyze the time complexity of the following dashboard update process.
// Assume kpis is a list of KPI data points
function updateDashboard(kpis) {
for (let i = 0; i < kpis.length; i++) {
renderKPI(kpis[i]);
}
}
function renderKPI(kpi) {
// Render the KPI on the dashboard
displayOnScreen(kpi);
}
This code updates the dashboard by rendering each KPI one by one.
Identify the loops, recursion, array traversals that repeat.
- Primary operation: Looping through each KPI in the list.
- How many times: Once for each KPI, so as many times as there are KPIs.
As the number of KPIs increases, the time to update the dashboard grows in a straight line.
| Input Size (n) | Approx. Operations |
|---|---|
| 10 | 10 render calls |
| 100 | 100 render calls |
| 1000 | 1000 render calls |
Pattern observation: Doubling the KPIs roughly doubles the work needed.
Time Complexity: O(n)
This means the time to update the dashboard grows directly with the number of KPIs.
[X] Wrong: "Adding more KPIs won't affect the update time much because each KPI is simple to render."
[OK] Correct: Even if each KPI is simple, rendering each one still takes time, so more KPIs mean more total work.
Understanding how dashboard update time grows helps you design efficient marketing tools and shows you can think about performance in real projects.
"What if we batch render all KPIs at once instead of one by one? How would the time complexity change?"
Practice
Solution
Step 1: Understand the role of a dashboard
A dashboard is designed to show important information clearly and quickly.Step 2: Identify the main function in marketing context
Marketing KPI dashboards focus on showing key numbers in one place for easy review.Final Answer:
To display key marketing numbers clearly in one place -> Option CQuick Check:
Dashboard = Clear key numbers [OK]
- Confusing dashboards with raw data storage
- Thinking dashboards only store data without visuals
- Assuming dashboards replace all reports with text
Solution
Step 1: Identify how filters work in dashboards
Filters let users select data subsets, often using slicers connected to fields.Step 2: Choose the correct method for date filtering
Adding a slicer visual connected to the Date field allows interactive filtering by date.Final Answer:
Add a slicer visual and connect it to the Date field -> Option DQuick Check:
Filter by slicer on Date [OK]
- Deleting data instead of filtering
- Using pie charts to filter data
- Using text boxes instead of filter controls
Solution
Step 1: Calculate total visits
Total = 5000 (Organic) + 3000 (Paid) + 2000 (Referral) = 10000 visits.Step 2: Calculate Paid visits percentage
Paid % = (3000 / 10000) * 100 = 30%.Final Answer:
30% -> Option AQuick Check:
Paid visits = 30% of total [OK]
- Adding percentages instead of calculating
- Using wrong total for percentage
- Confusing counts with percentages
Solution
Step 1: Understand filter connections
Filters must be linked to the data model fields used in visuals to affect them.Step 2: Identify why filter has no effect
If the filter is not connected properly, selecting values won't update charts.Final Answer:
The filter is not connected to the data model -> Option BQuick Check:
Filter connection missing = no effect [OK]
- Blaming colors for filter issues
- Assuming too many visuals cause filter failure
- Ignoring filter-data model link
Solution
Step 1: Choose visuals matching data types
Line charts show trends over time well; cards highlight single KPIs like conversion rate.Step 2: Select appropriate filter for time range
A date slicer filtered to last 6 months allows focused analysis on recent data.Final Answer:
Use a line chart for monthly revenue, a card for conversion rate, and a date slicer for last 6 months -> Option AQuick Check:
Visuals + filter match data needs [OK]
- Using pie charts for time series data
- Not adding time filters
- Choosing visuals that don't highlight KPIs clearly
