Skip to main content

Viva Insights Sample Code

Copilot Analytics

Analyze Microsoft 365 Copilot usage from Viva Insights — adoption metrics, Power User and Habitual User segmentation, and habit-based behavioral models in R, Python, and Power BI.

Copilot Analytics Scripts

This page contains specialized scripts for analyzing Microsoft Copilot usage data from Viva Insights.

Beyond covering key analyses around Copilot usage volume and breadth (range of actions and applications), these scripts also include a method for measuring Copilot habituality based on behavioral research. This approach determines whether a user can be considered a habitual Copilot user, enabling visualization through user segmentation that identifies Power Users and Habitual Users within an organization. This segmentation provides a framework for continuously tracking Copilot adoption success and measuring the effectiveness of your deployment strategy.

See our DAX Calculated Columns page for detailed instructions on how to identify Copilot Usage Segments using Power BI templates and pre-built DAX formulas.

For more information on the Copilot Usage Segments, see this introduction.

For more inspiration on analyzing Copilot adoption and impact, have a look at our advanced examples playbook.


Advanced Analysis Scripts

Copilot Advanced Analysis (R)

📄 copilot-analytics-examples.R

  • Purpose: Comprehensive analysis of Copilot usage patterns and trends
  • Language: R
  • Prerequisites: vivainsights R package, Copilot usage data
  • Key Analysis: Usage segmentation, trend analysis, adoption metrics
  • 📥 Download

Copilot Advanced Analysis (Python)

📄 copilot-analytics-examples.py

  • Purpose: Comprehensive analysis of Copilot usage patterns and trends
  • Language: Python
  • Prerequisites: vivainsights Python package, Copilot usage data
  • Key Analysis: Usage segmentation, trend analysis, adoption metrics
  • 📥 Download

Copilot Analytics (Jupyter Notebook)

📓 copilot-analytics-examples.ipynb

  • Purpose: Interactive analysis of Copilot usage with visualizations
  • Language: Python
  • Format: Jupyter Notebook
  • Prerequisites: vivainsights Python package, Copilot usage data
  • Key Features: Step-by-step analysis, interactive visualizations
  • 📥 Download

Power BI Integration

DAX Calculated Columns

📁 DAX Calculated Columns

  • Purpose: Pre-built DAX formulas for Copilot usage segmentation in Power BI
  • Language: DAX
  • Format: Individual .dax files
  • Prerequisites: Power BI Desktop, Copilot usage data

Available Columns:

📖 DAX Documentation


Usage Segmentation

User Segments Defined

These five segments form a single mutually-exclusive ladder, evaluated top-down so every user falls into exactly one tier (full definitions and decision tree on the Copilot Usage Segments page):

  1. Power Users: Habitual and averaging 15+ weekly Copilot actions
  2. Habitual Users: Habitual (9+ of 12 weeks in RL12W, all weeks in RL4W) but averaging < 15 weekly actions
  3. Novice Users: Not habitual, averaging 1+ weekly Copilot actions
  4. Low Users: Not habitual, some usage but averaging < 1 weekly action
  5. Non-users: No Copilot usage in the measurement period

Sample Data

Example Datasets

📁 Example Data


Getting Started

  1. Export Copilot Usage Data from Viva Insights
  2. Choose Your Analysis Method:
    • R/Python scripts for detailed analysis
    • DAX columns for Power BI dashboards
  3. Select Time Frame:
    • RL12W for long-term habit analysis
    • RL4W for pilot programs or short-term analysis
  4. Run Analysis using the appropriate script

Need Help?

Last updated: Jun 16, 2026 Edit this page on GitHub