Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ATB1999
Regular Visitor

Using Power BI as the User Interface for R machine learning models

Hi!

 

I do machine learning and statistical analysis in R; and lately, my company has been asking for the deployment of some trained models for certain purposes. As it is very explicit with deploying applications with sensitive data; it restricts ourselves to Power BI as the go-to tool.

 

I had some ideas in mind and wanted to double check here about the feasibility of them. Please, do assume I train my machine learning models in R separately and I import it as an object to be deployed outright in an R script of any type, like one we can find on Power BI. If that is the case, could I do the following use cases?:

 

  1. Analyzing a PDF that is input for a classification task, being either multiple or binary. It is important to assess feasibility of some ingestion mechanism of PDF's here that is custom... Is that feasible?

  2. selecting a specific row within an existing dataset within the Power BI report in order to run a regression / classification prediction on it. Is it possible?

 

I am not very acquainted with Power BI as a tool for doing machine learning, but I realized in many ways; if these simple use cases are feasible, we could develop a tool bypassing some work that approaches like Shiny apps could entail. Is there any possibility on getting further assistance with this feasibility? I would really appreciate it!

 

Thanks!

1 ACCEPTED SOLUTION
v-hashadapu
Community Support
Community Support

Hi @ATB1999 , thank you for reaching out to the Microsoft Fabric Community Forum.


You have some excellent ideas for integrating machine learning models into Power BI. Let me help you assess the feasibility of them.

  1. Analyzing a PDF for Classification (Multiple/Binary): Power BI does not have built-in support for direct PDF ingestion, but it’s possible to use R scripts within Power BI to handle PDFs and then perform machine learning tasks. So, it is feasible but requires some custom R script for text extraction and preprocessing in Power BI. Keep in mind that Power BI may have limitations regarding the file size and number of PDFs you want to process, so scalability could become a concern for very large datasets.
  2. Selecting a Specific Row within Power BI Dataset for Prediction: Power BI is highly interactive, and you can easily create dynamic reports and dashboards where users can filter and select specific rows or subsets of data. Power BI allows you to pass filtered data directly to R scripts embedded within reports or use DAX expressions to narrow down the dataset. You can make predictions on filtered data by integrating R scripts within Power BI reports. Power BI allows for filtering and passing data dynamically to the R script, so you could perform on-demand predictions on a selected subset of data.
  3. Overall Feasibility of Power BI for ML Deployment: Power BI allows integration of R scripts directly for data analysis and visualization. You can use R scripts in the data load process, transformation, or within visualizations themselves. This means that any machine learning models or statistical analysis you have in R can be embedded into Power BI reports via custom R visualizations or R scripts. Power BI allows users to run these scripts locally, and the resulting outputs can be visualized directly in Power BI.

Advantages:

  1. Using Power BI with R removes the need for a separate Shiny app, as everything can be integrated within the Power BI platform. You’re able to leverage Power BI’s visualization, filtering, and interactivity features while also making machine learning predictions directly in the report.
  2. Since you mentioned that your company deals with sensitive data, Power BI also offers robust security features, especially if you are using Power BI Service, with control over access, data privacy, and governance.

If this helps, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details.
Thank you.

View solution in original post

5 REPLIES 5
v-hashadapu
Community Support
Community Support

Hi @ATB1999 , thank you for reaching out to the Microsoft Fabric Community Forum.


You have some excellent ideas for integrating machine learning models into Power BI. Let me help you assess the feasibility of them.

  1. Analyzing a PDF for Classification (Multiple/Binary): Power BI does not have built-in support for direct PDF ingestion, but it’s possible to use R scripts within Power BI to handle PDFs and then perform machine learning tasks. So, it is feasible but requires some custom R script for text extraction and preprocessing in Power BI. Keep in mind that Power BI may have limitations regarding the file size and number of PDFs you want to process, so scalability could become a concern for very large datasets.
  2. Selecting a Specific Row within Power BI Dataset for Prediction: Power BI is highly interactive, and you can easily create dynamic reports and dashboards where users can filter and select specific rows or subsets of data. Power BI allows you to pass filtered data directly to R scripts embedded within reports or use DAX expressions to narrow down the dataset. You can make predictions on filtered data by integrating R scripts within Power BI reports. Power BI allows for filtering and passing data dynamically to the R script, so you could perform on-demand predictions on a selected subset of data.
  3. Overall Feasibility of Power BI for ML Deployment: Power BI allows integration of R scripts directly for data analysis and visualization. You can use R scripts in the data load process, transformation, or within visualizations themselves. This means that any machine learning models or statistical analysis you have in R can be embedded into Power BI reports via custom R visualizations or R scripts. Power BI allows users to run these scripts locally, and the resulting outputs can be visualized directly in Power BI.

Advantages:

  1. Using Power BI with R removes the need for a separate Shiny app, as everything can be integrated within the Power BI platform. You’re able to leverage Power BI’s visualization, filtering, and interactivity features while also making machine learning predictions directly in the report.
  2. Since you mentioned that your company deals with sensitive data, Power BI also offers robust security features, especially if you are using Power BI Service, with control over access, data privacy, and governance.

If this helps, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details.
Thank you.

Hi @v-hashadapu .

 

Thanks for your response. I see, for what you are saying; that Power BI may perfectly work for available tabular data for which we would like to perform some analysis on (embedding a machine learning model provided fields available are the same used in training, and performing predictions on rows selected).

 

This does not hold when we talk about PDF's, as apart from the processing happening on the tool, there is no clear feature on Power BI to have a kind of "drop PDF here" in order to do an analysis beyond the scope of data contained within the tool.

 

Is this a summary you would endorse? If that is the case, I can now clearly see that for some exclusive cases, Shiny apps may still be a great option; but Power BI can be a powerhouse for clearly defined and scoped data.

 

Thanks for your response!

lbendlin
Super User
Super User

Power BI comes in two flavors - as a web page where users can interact with premade reports, and as a Windows application ("Power BI Desktop")  where you can also freely modify the structure of the report.

 

Which of these user interfaces were you planning to use?

Hi @lbendlin 

 

Power BI Desktop, that is for sure. What kind of difference such that creates?

 

Thanks!

You need to plan for user training on how to operate the Power BI Desktop app, and regularly update to newer versions of Power BI and the R libraries.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.