Bird
Raised Fist0
Digital Marketingknowledge~10 mins

Dashboard creation for marketing KPIs in Digital Marketing - Interactive Code Practice

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a KPI card showing total website visits.

Digital Marketing
total_visits = df['[1]'].sum()
Drag options to blanks, or click blank then click option'
Aclicks
Bwebsite_visits
Cbounce_rate
Dconversion_rate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'clicks' instead of visits
Using 'bounce_rate' which is a percentage, not a count
2fill in blank
medium

Complete the code to calculate the average conversion rate.

Digital Marketing
avg_conversion = df['[1]'].mean()
Drag options to blanks, or click blank then click option'
Abounce_rate
Bclicks
Cimpressions
Dconversion_rate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'clicks' which is a count, not a rate
Using 'bounce_rate' which is a different metric
3fill in blank
hard

Fix the error in the code to filter data for the last 30 days.

Digital Marketing
recent_data = df[df['date'] [1] pd.Timestamp.today() - pd.Timedelta(days=30)]
Drag options to blanks, or click blank then click option'
A!=
B==
C>=
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<=' which selects older dates
Using '==' which selects only one date
4fill in blank
hard

Fill both blanks to create a dictionary of average clicks and impressions per campaign.

Digital Marketing
avg_metrics = {campaign: {'clicks': [1], 'impressions': [2] for campaign in campaigns}
Drag options to blanks, or click blank then click option'
Adf[df['campaign'] == campaign]['clicks'].mean()
Bdf[df['campaign'] == campaign]['bounce_rate'].mean()
Cdf[df['campaign'] == campaign]['impressions'].mean()
Ddf[df['campaign'] == campaign]['conversion_rate'].mean()
Attempts:
3 left
💡 Hint
Common Mistakes
Using bounce_rate or conversion_rate instead of clicks or impressions
Mixing up clicks and impressions columns
5fill in blank
hard

Fill all three blanks to create a KPI summary with total visits, average conversion rate, and max bounce rate.

Digital Marketing
kpi_summary = {'total_visits': [1], 'avg_conversion': [2], 'max_bounce': [3]
Drag options to blanks, or click blank then click option'
Adf['website_visits'].sum()
Bdf['conversion_rate'].mean()
Cdf['bounce_rate'].max()
Ddf['clicks'].sum()
Attempts:
3 left
💡 Hint
Common Mistakes
Using clicks instead of website_visits for total visits
Using min instead of max for bounce rate

Practice

(1/5)
1. What is the main purpose of a marketing KPI dashboard?
easy
A. To create complex formulas for data analysis only
B. To store raw marketing data without visualization
C. To display key marketing numbers clearly in one place
D. To replace all marketing reports with text summaries

Solution

  1. Step 1: Understand the role of a dashboard

    A dashboard is designed to show important information clearly and quickly.
  2. Step 2: Identify the main function in marketing context

    Marketing KPI dashboards focus on showing key numbers in one place for easy review.
  3. Final Answer:

    To display key marketing numbers clearly in one place -> Option C
  4. Quick Check:

    Dashboard = Clear key numbers [OK]
Hint: Dashboards summarize key info visually [OK]
Common Mistakes:
  • Confusing dashboards with raw data storage
  • Thinking dashboards only store data without visuals
  • Assuming dashboards replace all reports with text
2. Which of the following is the correct way to add a filter for 'Date' in a marketing dashboard tool?
easy
A. Create a text box with date values
B. Write a SQL query to delete dates from the data
C. Use a pie chart to show dates
D. Add a slicer visual and connect it to the Date field

Solution

  1. Step 1: Identify how filters work in dashboards

    Filters let users select data subsets, often using slicers connected to fields.
  2. Step 2: Choose the correct method for date filtering

    Adding a slicer visual connected to the Date field allows interactive filtering by date.
  3. Final Answer:

    Add a slicer visual and connect it to the Date field -> Option D
  4. Quick Check:

    Filter by slicer on Date [OK]
Hint: Use slicers for interactive filters [OK]
Common Mistakes:
  • Deleting data instead of filtering
  • Using pie charts to filter data
  • Using text boxes instead of filter controls
3. Given a dashboard showing total website visits by channel, if the data is: Organic=5000, Paid=3000, Referral=2000, what will the pie chart show for Paid visits percentage?
medium
A. 30%
B. 25%
C. 50%
D. 20%

Solution

  1. Step 1: Calculate total visits

    Total = 5000 (Organic) + 3000 (Paid) + 2000 (Referral) = 10000 visits.
  2. Step 2: Calculate Paid visits percentage

    Paid % = (3000 / 10000) * 100 = 30%.
  3. Final Answer:

    30% -> Option A
  4. Quick Check:

    Paid visits = 30% of total [OK]
Hint: Divide part by total, multiply by 100 [OK]
Common Mistakes:
  • Adding percentages instead of calculating
  • Using wrong total for percentage
  • Confusing counts with percentages
4. You created a dashboard but the filter for 'Campaign' does not change the charts. What is the most likely cause?
medium
A. The data source is offline
B. The filter is not connected to the data model
C. The dashboard has too many visuals
D. The charts are using the wrong color scheme

Solution

  1. Step 1: Understand filter connections

    Filters must be linked to the data model fields used in visuals to affect them.
  2. Step 2: Identify why filter has no effect

    If the filter is not connected properly, selecting values won't update charts.
  3. Final Answer:

    The filter is not connected to the data model -> Option B
  4. Quick Check:

    Filter connection missing = no effect [OK]
Hint: Check filter connections to data fields [OK]
Common Mistakes:
  • Blaming colors for filter issues
  • Assuming too many visuals cause filter failure
  • Ignoring filter-data model link
5. You want to create a dashboard showing monthly revenue and conversion rate by marketing channel with a filter for last 6 months. Which combination is best?
hard
A. Use a line chart for monthly revenue, a card for conversion rate, and a date slicer for last 6 months
B. Use a pie chart for monthly revenue, a table for conversion rate, and no filter
C. Use a bar chart for total revenue only, a text box for conversion rate, and a filter for all time
D. Use a scatter plot for revenue and conversion, and a slicer for last year

Solution

  1. Step 1: Choose visuals matching data types

    Line charts show trends over time well; cards highlight single KPIs like conversion rate.
  2. Step 2: Select appropriate filter for time range

    A date slicer filtered to last 6 months allows focused analysis on recent data.
  3. Final Answer:

    Use a line chart for monthly revenue, a card for conversion rate, and a date slicer for last 6 months -> Option A
  4. Quick Check:

    Visuals + filter match data needs [OK]
Hint: Match chart type to data and add time slicer [OK]
Common Mistakes:
  • Using pie charts for time series data
  • Not adding time filters
  • Choosing visuals that don't highlight KPIs clearly