Power BI R and Python Visuals Retirement in May 2027: Complete Migration and Solution Guide

November 21, 2026 62 visits

Microsoft has announced that R and Python visuals in Power BI, including R-powered custom visuals, will retire in May 2027. This is not just a feature update. It means organizations must identify affected reports, assess what each visual does, select an alternative, rebuild and validate the solution, and publish the updated reports before the retirement date.

This guide provides a practical migration approach for Power BI developers, report owners, BI teams, and administrators. It covers how to find affected visuals, how to decide on the right replacement, and how to migrate common visualization and advanced analytics scenarios.

Important: Microsoft has announced May 2027 as the retirement month. The official announcement does not specify an exact retirement day.

1. Understand What Is Being Retired

The retirement applies to R and Python visuals used inside interactive Power BI reports. It includes visuals created using scripts as well as custom visuals that are powered by R.

Power BI feature Retirement impact
Python visual Retires in May 2027
R visual Retires in May 2027
R-powered custom visual Retires in May 2027
Python scripts in Power Query used to populate tables Not affected by this visual retirement announcement
Built-in Power BI visuals Not part of this retirement

What happens after retirement?

  • R and Python visuals stop working in reports published to the Power BI service, including reports published before the retirement.
  • Future versions of Power BI Desktop will no longer include R and Python visuals, so users will not be able to add them to new reports.
  • Older versions of Power BI Desktop will continue to render existing R and Python visuals locally, provided the required local R or Python installation is available.
  • Microsoft does not provide an automatic in-report conversion that recreates the existing visual. Each affected visual needs to be replaced or redesigned.
Key point: Do not assume that an existing published report will continue to display its R or Python visuals after May 2027. Plan the migration before the retirement month.

2. Identify All Affected Reports and Visuals

The first task is to build an inventory. Do not start rebuilding visuals until you know how many reports are affected, who owns them, and what business purpose each visual serves.

Step 1: Review reports in Power BI

  1. List the workspaces that contain production and business-critical reports.
  2. Review each report page for Python visuals and R visuals.
  3. Check whether any AppSource or organizational custom visuals are powered by R.
  4. Record the report name, workspace, page, visual purpose, owner, audience, and refresh or usage importance.

Step 2: Search PBIP report definitions

If your reports are stored in Power BI Project (PBIP) format and managed through source control, you can search report definition files across the repository.

Microsoft documents these visual type values:

Visual type values to search for
pythonVisual
scriptVisual
  • pythonVisual identifies Python visuals.
  • scriptVisual identifies R visuals.

Use your source-control platform or an editor such as Visual Studio Code to search the PBIP report definition files for these values. Review the matching report and page definitions to identify the affected visuals.

Important limitation: These visual type values do not identify R-powered custom visuals. Review the custom visuals used in each report separately, including visuals obtained from AppSource and visuals developed internally.

Step 3: Create an impact register

Use an inventory like the following to manage the migration:

Field What to record
Workspace and report Where the affected report is published
Page and visual Page name, visual title, and visual type
Business purpose What question the visual answers
Script and dependencies R/Python code, packages, data fields, and transformations
Audience and criticality Who uses it and how important it is to business operations
Replacement decision Built-in visual, custom visual, Fabric notebook, or Fabric app
Owner and target date Person responsible and planned completion date
Validation status Testing, business approval, and deployment status

3. Preserve the Existing Implementation Before Rebuilding

Before changing a report, preserve the current implementation. The original script is often the only complete record of the calculations and visual logic used to generate the output.

  1. Save every R and Python script outside the PBIX report.
  2. Record the packages and package versions used by each script.
  3. Document the fields passed from the Power BI visual into the script.
  4. Capture screenshots of the current visual, including filter and slicer states.
  5. Record sorting, grouping, aggregation, formatting, labels, legends, and tooltip behaviour.
  6. Identify whether the script performs data preparation or calculations in addition to drawing the chart.
  7. Keep a copy of the original report so that the current result can be used as a comparison during testing.
Migration principle: Rebuild the business outcome, not just the appearance of the chart. A replacement is not complete if it looks similar but changes the underlying calculation or interpretation.

4. Choose the Right Replacement Architecture

Microsoft identifies three main replacement directions: built-in Power BI visuals, custom visuals, and analysis recreated in Fabric notebooks. Fabric apps are another option when a visualization cannot be recreated appropriately inside a Power BI report.

Replacement Best suited for Considerations
Built-in Power BI visual Standard charts, comparisons, trends, distributions, tables, and KPI reporting Usually the simplest option to maintain. Some highly specialized chart designs may need redesign.
Existing or new custom visual Specialized chart types or report-native interactions that built-in visuals do not provide Review certification, security, support, licensing, compatibility, and long-term ownership.
Fabric notebook Advanced statistical analysis, machine learning, complex data preparation, and specialized analytical workflows Requires a data and execution architecture outside the report visual. Validate library availability, data access, refresh, and sharing.
Fabric app Visual experiences that cannot be recreated appropriately inside a Power BI report Design and share the experience as an app rather than treating it as a drop-in replacement visual.

Use this decision process

  1. Is it a standard business chart? Rebuild it with a built-in Power BI visual.
  2. Does it require a specialized chart but must remain inside the report? Evaluate an existing custom visual or develop a custom visual using the Power BI visuals SDK.
  3. Does it perform complex statistical or machine-learning analysis? Move the analytical workload to a Fabric notebook and decide how the resulting data or outputs will be consumed.
  4. Can the visualization not be represented suitably in a Power BI report? Evaluate a Fabric app for the separate visualization experience.

5. Solution 1: Replace the Script with a Built-in Power BI Visual

This should be the first option to evaluate. If the R or Python script creates a chart that can be represented by a standard Power BI visual, rebuilding it natively is generally the most straightforward migration path.

Example: Replace a Python sales trend chart

Assume an existing Python visual displays monthly sales as a line chart. The script groups sales by month and draws the trend using Matplotlib.

You can rebuild the same business view using a native line chart, provided the semantic model already contains the appropriate date and sales fields.

Migration steps

  1. Open the affected report in Power BI Desktop.
  2. Identify the date field and sales measure used by the Python visual.
  3. Add a native Line chart to the report page.
  4. Place the month or date field on the X-axis.
  5. Place the sales measure on the Y-axis.
  6. Reapply the required filters, sorting, labels, title, and formatting.
  7. Compare the new visual with the original Python output across representative date ranges and slicer selections.
Original script behaviour Native Power BI replacement
Monthly grouping Date hierarchy or a month-level field from the date dimension
Sales aggregation Existing semantic model measure
Chart title and labels Visual title and formatting options
Filtering by region or product Report slicers, filters, and visual interactions
Custom colour rules Data colours and conditional formatting where supported
When this solution is suitable: Use a native visual when the main requirement is communicating a business metric or pattern. Avoid retaining a script-based visual simply because the original chart used Python or R.

6. Solution 2: Replace It with an Existing or Custom Power BI Visual

Some visuals use specialized chart types that are not available as standard Power BI visuals. In those cases, evaluate an existing custom visual or develop a custom visual using the Power BI visuals SDK.

Step 1: Search for an existing visual

  • Identify the exact chart type and the interactions required.
  • Search AppSource and your organization’s approved custom visual catalogue.
  • Check whether the visual supports the required data roles, formatting, filtering, and accessibility needs.
  • Review publisher information, certification status where relevant, licensing, security requirements, and support arrangements.
  • Test the visual with your report’s actual data and deployment environment before selecting it.

Step 2: Develop a custom visual if no suitable option exists

If an existing visual does not meet the requirement, a development team can evaluate the Power BI custom visuals SDK. This is a software development project, not an automatic conversion of the R or Python script.

  1. Write a visual specification describing the chart, data inputs, formatting options, and interactions.
  2. Separate the calculation requirements from the rendering requirements.
  3. Define the data roles and mapping expected by the visual.
  4. Implement the visual using the Power BI custom visuals SDK.
  5. Test filtering, resizing, rendering, accessibility, performance, and security.
  6. Package, review, deploy, and maintain the visual according to your organization’s governance process.
Important: A custom visual is appropriate when the visualization must remain part of the Power BI report experience. Confirm who will own future fixes and compatibility updates before choosing this route.

7. Solution 3: Move Advanced Analytics to a Microsoft Fabric Notebook

Some R and Python visuals do more than draw charts. They may perform statistical tests, clustering, forecasting, machine learning, or complex data preparation. In these cases, moving the analytical workload to a Fabric notebook may be more appropriate than trying to reproduce all the logic inside a report visual.

Recommended architecture

Example migration architecture
Source Data
    |
    v
Microsoft Fabric Lakehouse / Warehouse
    |
    v
Fabric Notebook
    |
    +---- Data preparation
    +---- Statistical analysis / Machine learning
    +---- Model outputs / Analytical results
    |
    v
Curated Output Tables
    |
    v
Power BI Semantic Model
    |
    v
Power BI Report

This architecture separates analytical processing from report rendering. The notebook performs the advanced analysis and writes structured results to a governed data location. Power BI then consumes those results through a semantic model and presents them using supported visuals.

Step-by-step migration

  1. Inspect the existing script. Identify input fields, transformations, algorithms, package dependencies, parameters, and output values.
  2. Separate data preparation from chart rendering. Move reusable calculations and analytical logic into the notebook. Treat chart styling as a separate requirement.
  3. Choose the data location. Identify the Lakehouse, Warehouse, or other supported source that the notebook will read from and write to.
  4. Recreate the analysis. Implement the required transformations or model in the notebook using supported languages and libraries.
  5. Persist the results. Write a structured output table that can be consumed by the Power BI semantic model.
  6. Connect Power BI. Build or update the semantic model to use the curated output table.
  7. Build the report experience. Use native or custom Power BI visuals to present the notebook results.
  8. Operationalize the workflow. Configure execution, refresh dependencies, permissions, monitoring, and failure handling.

Illustrative example: Customer segmentation

Suppose a Python visual currently runs K-Means clustering and plots customers by segment. A notebook-based solution can perform the clustering and save customer IDs with their assigned segment. Power BI can then display the segment counts, customer distribution, and segment-level business metrics.

The following example illustrates the processing pattern. It assumes a Fabric Lakehouse table named CustomerFeatures already exists and contains numeric feature columns. Replace the table and column names with your own schema, and validate missing values and feature scaling before using a clustering model in production.

Illustrative PySpark notebook code
from pyspark.ml.feature import VectorAssembler, StandardScaler
from pyspark.ml.clustering import KMeans

# Read the prepared customer feature table
customers = spark.read.table("CustomerFeatures")

feature_columns = [
    "AnnualSpend",
    "OrderFrequency",
    "AverageOrderValue"
]

# Assemble numeric columns into a feature vector
assembler = VectorAssembler(
    inputCols=feature_columns,
    outputCol="raw_features",
    handleInvalid="skip"
)

assembled = assembler.transform(customers)

# Scale features so variables with larger ranges do not dominate
scaler = StandardScaler(
    inputCol="raw_features",
    outputCol="features",
    withMean=True,
    withStd=True
)

scaler_model = scaler.fit(assembled)
scaled = scaler_model.transform(assembled)

# Train a K-Means model - validate k for your use case
kmeans = KMeans(
    k=4,
    seed=42,
    featuresCol="features",
    predictionCol="CustomerSegment"
)

model = kmeans.fit(scaled)
segmented = model.transform(scaled)

# Save the segment assignment for Power BI consumption
(
    segmented
    .select("CustomerID", "CustomerSegment")
    .write
    .mode("overwrite")
    .format("delta")
    .saveAsTable("CustomerSegmentResults")
)

What changes in the Power BI report?

  • The clustering process no longer runs inside the report visual.
  • The notebook produces a reusable table containing customer segment assignments.
  • The semantic model connects the customer data with the segment results.
  • Power BI visuals display segment counts, segment comparisons, and customer-level details.
Do not treat this sample as a complete production model. Select the number of clusters using an appropriate evaluation process, validate the data, monitor model quality, and confirm that the notebook’s libraries and runtime are supported in your Fabric environment.

8. Solution 4: Use a Fabric App for Visualizations That Do Not Fit in a Report

Some analytical experiences may not translate well into a standard Power BI report or a custom visual. Microsoft identifies Fabric apps as an option for visualizations that cannot be recreated in a Power BI report.

Consider this option when the requirement is closer to a dedicated analytical application than a single report chart. For example, the experience may need a specialized interface or a workflow that is not naturally represented by a Power BI report page.

  1. Document why the existing visualization cannot be represented appropriately in a Power BI report.
  2. Define the users, access requirements, data sources, and expected user interactions.
  3. Evaluate the suitable Fabric app approach for the required experience.
  4. Connect the app to the governed analytical outputs and data assets.
  5. Test access, performance, usability, and the process for sharing the experience with users.
  6. Communicate to report consumers where the new experience will be available.

A Fabric app is not a one-to-one replacement visual. It is an alternative way to deliver an analytical experience when a report-based implementation is not suitable.

9. What About Python Scripts in Power Query?

This retirement announcement is specifically about R and Python visuals in interactive Power BI reports. Microsoft states that Python scripts used in Power Query to populate tables are not affected by this visual retirement.

However, teams should still document those scripts separately. Their refresh process, gateway requirements, package dependencies, and operational support should be reviewed as part of a broader platform assessment. Do not remove a Power Query script solely because of the R and Python visual retirement announcement.

Keep the distinction clear: A Python script used in Power Query for data preparation is different from a Python visual used to draw a chart on a report page.

10. Validate the Replacement Before Publishing

A replacement visual must be tested for analytical correctness and report behaviour. A chart that looks similar is not necessarily equivalent to the original implementation.

Functional validation checklist

  • Does the replacement use the same business definitions and calculations?
  • Are totals, averages, percentages, statistical outputs, and segment assignments consistent with the approved logic?
  • Do report filters and slicers produce the expected results?
  • Are sorting, grouping, labels, legends, and formatting correct?
  • Are blank values, outliers, duplicate records, and unexpected categories handled appropriately?
  • Does the report behave correctly at different screen sizes?
  • Does the solution meet performance expectations with production-scale data?
  • Have permissions, refresh dependencies, and deployment requirements been tested?
  • Has the business owner approved the replacement?

Compare old and new outputs

Use representative test cases rather than checking only one default report view. Include normal periods, peak periods, unusual data, empty selections, and important filter combinations. Where exact visual reproduction is not possible, document the intentional design or calculation differences and obtain business approval.

11. Recommended Migration Timeline

May 2027 is the announced retirement month. Work backwards from your organization’s deployment and approval lead times instead of waiting until the final weeks.

Phase Recommended activities Deliverable
Phase 1: Discovery Scan reports, inspect custom visuals, identify owners and dependencies Complete impact register
Phase 2: Assessment Classify visual purpose, complexity, business criticality, and replacement options Approved solution design
Phase 3: Migration Rebuild visuals, move advanced analytics, update models and report pages Updated reports and analytical workflows
Phase 4: Testing Validate calculations, interactions, refresh, access, and performance Test evidence and business sign-off
Phase 5: Deployment Publish replacements, communicate changes, monitor adoption Production-ready migrated solution

Set internal deadlines for each phase based on the number of reports and the complexity of the scripts. Prioritize high-impact reports and any solution that requires custom development or a new Fabric architecture.

12. Common Migration Mistakes to Avoid

  • Waiting until 2027: Large report estates and custom development require time for discovery, testing, and approval.
  • Replacing only the chart: The original script may contain important data preparation or analytical logic that also needs to be migrated.
  • Ignoring R-powered custom visuals: Searching only for Python and R script visual types will not identify all R-powered custom visuals.
  • Assuming Desktop compatibility means Service compatibility: Older Desktop versions may continue to render visuals locally, but that does not mean published reports will continue to work in the Power BI service.
  • Moving everything to notebooks: A simple chart is usually better rebuilt with a native visual. Use notebooks where the analytical workload justifies them.
  • Ignoring package dependencies: A notebook migration may require changes to libraries, runtime versions, data access, and code.
  • Skipping business validation: Similar-looking visuals can produce different results if aggregation, filtering, or statistical logic changes.

Migration Exercise: Assess One Existing Report

Select a Power BI report that contains an R or Python visual and complete the following assessment.

  1. Identify the visual type and the page where it appears.
  2. Write down the business question the visual answers.
  3. Save its script and list all package dependencies.
  4. Identify whether the script performs calculations, data preparation, or only visualization.
  5. Choose the most appropriate replacement: built-in visual, custom visual, Fabric notebook, or Fabric app.
  6. Define at least five test cases to compare the replacement with the original output.
  7. Record the owner, target date, and approval status in your migration register.

Frequently Asked Questions

1. When will Power BI R and Python visuals retire?

Microsoft has announced that R and Python visuals, including R-powered custom visuals, will retire in May 2027. The announcement does not specify an exact day.

2. Will existing published reports stop displaying R and Python visuals?

Yes. After retirement, these visuals stop working in published reports in the Power BI service, including reports published before the retirement.

3. Can I continue using R and Python visuals in Power BI Desktop?

Older versions of Power BI Desktop will continue to render them locally using the R or Python installation on the computer. Future versions of Power BI Desktop will not include these visuals.

4. Are Python scripts in Power Query affected?

No. Microsoft states that Python scripts used in Power Query to populate tables are not affected by this visual retirement.

5. Will Microsoft automatically convert my existing visuals?

No automatic in-report migration recreates the exact R or Python visual. You must replace or redesign each affected visual using an appropriate alternative.

6. Should every Python or R visual be moved to Microsoft Fabric?

No. Use built-in Power BI visuals for standard charts, custom visuals for specialized report-native visualizations, and Fabric notebooks for advanced analytical workloads. Consider Fabric apps when the visualization cannot be recreated appropriately in a report.

Official Microsoft Resources

Conclusion

The retirement of R and Python visuals in May 2027 requires a planned migration for every affected Power BI report. Start by building a complete inventory, preserving scripts and dependencies, and understanding the business purpose of each visual.

Choose the replacement based on the requirement: use native visuals for standard reporting, custom visuals for specialized report experiences, Fabric notebooks for advanced analytics, and Fabric apps for visualization experiences that do not fit inside a Power BI report.

Most importantly, validate the analytical results, report interactions, refresh process, and business outcomes before publishing the replacement. A structured migration now will reduce the risk of broken reports when the retirement takes effect.