Enterprise Reporting
  • Introduction
  • Understanding reports with clarity (Definitions)
  • Optimizing key performance indicators (via the Groups tab)
    • Dashboard
    • Reporting section
      • Progress report
      • Adoption report
      • Engagement report
      • Content insights
        • XP
        • Courses
        • Projects
        • Tracks
      • Assessments
      • Certifications
      • Time in Learn
      • DataLab
      • Export
    • Skill Matrix
  • Integrating our data into your tools (via Data Connector 2.0)
    • Explore the data model
      • Fact tables
      • Dimension tables
      • Bridge tables
      • Metrics tables
    • Common use cases
    • Sample queries
    • Queries to recreate key reports in the Groups tab
      • Dashboard
        • Members who have earned XP
      • Reporting section
        • Progress report
        • Content insights
        • Assessments
        • Certification Insights
        • Time in Learn
    • Domain Gotchas
    • Getting started with Data Connector 2.0
      • Enable Data Connector 2.0
      • Your credentials
      • Storing your credentials
    • Using Data Connector 2.0
      • Integrating with your BI tools
        • Microsoft Power BI
        • Tableau
        • Looker
        • DataLab
      • Downloading your data
        • S3 Browser (Windows)
        • Cyberduck (Mac or Windows)
        • AWS CLI (Linux)
    • Changelog
    • Migrating from Data Connector 1.0
  • FAQ
  • Data Connector 1.0 - Documentation
    • [Data Connector 1.0] Explore Data Model
      • [Data Connector 1.0] Data Model
      • [Data Connector 1.0] Changelog
      • [Data Connector 1.0] Example queries
    • [Data Connector 1.0] Getting started
      • [Data Connector 1.0] Enabling the Data Connector
      • [Data Connector 1.0] Your Credentials
      • [Data Connector 1.0] Storing your Credentials
    • [Data Connector 1.0] Using the Data Connector
      • [Data Connector 1.0] Analyzing data
        • [Data Connector 1.0] DataLab
        • [Data Connector 1.0] Microsoft Power BI
        • [Data Connector 1.0] Tableau
      • [Data Connector 1.0] Downloading data
        • [Data Connector 1.0] S3 Browser (Windows)
        • [Data Connector 1.0] 3Hub (Mac)
        • [Data Connector 1.0] AWS CLI (Linux)
    • [Data Connector 1.0] Data Connector FAQ
      • [Data Connector 1.0] Deprecating dcdcpy and dcdcr
Powered by GitBook
On this page
  1. Integrating our data into your tools (via Data Connector 2.0)
  2. Queries to recreate key reports in the Groups tab
  3. Reporting section

Progress report

PreviousReporting sectionNextContent insights

Last updated 1 month ago

The Progress report shows a table with all active members in the organization. For each member who has earned XP, it will show the total number of completions on courses, course chapters, projects, practices, tracks, and XP earned.

The filters section allows you to modify the report. The query below replicates the Progress report using the default filters:

  • All time

  • Since the user was part of the group

  • All license types

  • All content types

WITH last_xp_earned AS (
        SELECT
          user_id,
          max(occurred_at) AS last_xp_earned_at 
        FROM data_connector_1234.fact_learn_events
        WHERE xp_earned > 0
        GROUP BY user_id
    ),

   -- The Progress report includes only current members
    current_users AS (
        SELECT user_id
        FROM data_connector_1234.bridge_user_group
        WHERE ended_at IS NULL
    ),

    /* We use a separate CTE for XP events to specify 
    which events to include. */
    xp_events AS (
        SELECT 
            events.user_id, 
            events.event_name, 
            events.occurred_at, 
            events.xp_earned
        FROM data_connector_1234.fact_learn_events AS events 
        -- only current members
        INNER JOIN current_users 
          ON events.user_id = current_users.user_id
        WHERE events.event_name IN ('assessment_engaged', 
                                'course_engagement', 
                                'practice_engagement', 
                                'project_engagement', 
                                'b2b_onboarding_xp_boost', 
                                'alpa_onboarding')
    ),

    completion_events AS (
        SELECT 
            events.user_id, 
            events.event_name, 
            events.occurred_at
        FROM data_connector_1234.fact_learn_events AS events 
        -- only current members
        INNER JOIN current_users 
            ON events.user_id = current_users.user_id
        WHERE events.event_name IN ('assessment_completed', 
                                'course_completed', 
                                'practice_completed', 
                                'project_completed', 
                                'chapter_completed', 
                                'track_completed')
    ),

    completions AS (
        SELECT 
            user_id,
            count_if(event_name = 'course_completed') AS nb_courses_compled,
            count_if(event_name = 'chapter_completed') AS nb_chapters_completed,
            count_if(event_name = 'assessment_completed') AS nb_assessments_completed,
            count_if(event_name = 'project_completed') AS nb_projects_completed,
            count_if(event_name = 'practice_completed') AS nb_practices_completed,
            count_if(event_name = 'track_completed') AS nb_tracks_completed
        FROM completion_events
        GROUP BY user_id

    ),
    xp_earned AS (
        SELECT
            user_id,
            coalesce(sum(xp_earned), 0) as total_xp_earned
        FROM xp_events
        GROUP BY user_id
    )

SELECT 
    user.email,
    coalesce(completions.nb_courses_compled, 0) AS nb_courses_compled,
    coalesce(completions.nb_chapters_completed, 0) AS nb_chapters_completed,
    coalesce(completions.nb_assessments_completed, 0) AS nb_assessments_completed,
    coalesce(completions.nb_projects_completed, 0) AS nb_projects_completed,
    coalesce(completions.nb_practices_completed, 0) AS nb_practices_completed,
    coalesce(completions.nb_tracks_completed, 0) AS nb_tracks_completed,
    lxe.last_xp_earned_at,
    coalesce(xpe.total_xp_earned, 0) AS total_xp_earned
FROM completions 
LEFT JOIN last_xp_earned AS lxe 
    ON completions.user_id = lxe.user_id 
LEFT JOIN xp_earned AS xpe 
    ON completions.user_id = xpe.user_id
LEFT JOIN data_connector_1234.dim_user AS user
    ON completions.user_id = user.user_id
ORDER BY user.email