How do you use R visuals in Power BI Desktop

0 votes
I am trying to create R visuals with the help of R-Scripts and these are the challenges I am facing:

1. I am not able to edit Queries

2. It is asking for permissions and security

3. Run Scripts option is not available

How do I create R visuals using R Scripts?
Apr 10, 2019 in Power BI by Phalguni
• 1,020 points
702 views

1 answer to this question.

0 votes

Hi,

In order to use R Visuals you need to first install R and enable it in Power BI Desktop

Follow these steps to use R Visuals in Query Editor:

Step 1: 

•  Load your data into Power BI Desktop

•  Get Data > CSV from the Home ribbon in Power BI Desktop

Step 2: 

•  Select the file and Select Open

•  CSV file is displayed in the CSV file dialog

Step 3: 

Once the data is loaded you will be able to see it in the Fields pane in Power BI Desktop

Step 4:

Open Query Editor  by selecting Edit Queries from the Home tab in Power BI Desktop

Step 5: 

In Transform tab, select RUN R Script and the Run R Script editor appears

Step 6: 

Enter your R Script in the R Script Editor      

   Note: You will need mice library installed in you R  environment for your script code to work properly

   library(mice)

   tempData <- mice(dataset,m=1,maxit=50,meth='pmm',seed=100)

   completedData <- complete(tempData,1)

   output <- dataset

   output$completedValues <- completedData$"SMI missing values"

Step 7: 

After selecting OK, Query Editor displays a warning about data privacy

Step 8: 

For R Scripts to run properly, all the data sources must be public

Now you can finally create your own visualizations depending upon your dataset.

Hope This Helps!!

answered Apr 10, 2019 by Avantika
• 1,520 points

Related Questions In Power BI

0 votes
1 answer

How do you troubleshoot inconsistent visuals or slicer behavior across different pages in a Power BI report?

Investigation of various potential causes of differing ...READ MORE

answered Nov 4 in Power BI by pooja
• 5,410 points
44 views
0 votes
1 answer

How do you create visualizations in Power BI?

Visualizations in Power BI Visuals are the end-result ...READ MORE

answered Feb 27, 2019 in Power BI by Phalguni
• 1,020 points
967 views
0 votes
1 answer

How do you add a slicer from different table in Power BI?

In order to add a slicer from ...READ MORE

answered Mar 5, 2019 in Power BI by Phalguni
• 1,020 points
1,601 views
0 votes
1 answer

How do you embed dashboard using JavaScript in Power BI?

Dashboards in Power BI can be embedded ...READ MORE

answered Mar 5, 2019 in Power BI by Phalguni
• 1,020 points
2,052 views
0 votes
1 answer

How To use R Integration in Power BI?

Hi,  There are a lot of packages available ...READ MORE

answered May 3, 2019 in Power BI by Avantika
• 1,520 points
2,624 views
0 votes
1 answer

How do I use Python scripts in Power BI?

Hi, You can create interactive reports out of ...READ MORE

answered May 2, 2019 in Power BI by Avantika
• 1,520 points
2,424 views
0 votes
0 answers

How do you change the tables in chart filters?

I am working on a report that shows ...READ MORE

May 10, 2019 in Power BI by anonymous
632 views
0 votes
1 answer

How do you change the tables in chart filters?

Hi, You can use the following measure. Measure 2 = ...READ MORE

answered May 10, 2019 in Power BI by Avantika
• 1,520 points
623 views
0 votes
1 answer

How do you run R script visual in Power BI Service?

Hi, It seems that your data format not recognized correctly ...READ MORE

answered May 21, 2019 in Power BI by Avantika
• 1,520 points

edited May 22, 2019 by Omkar 1,670 views
0 votes
1 answer

How do you create a link visual in Power BI?

You can easily create a link between ...READ MORE

answered Mar 9, 2019 in Power BI by Avantika
• 1,520 points

edited Mar 9, 2019 by Avantika 5,152 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP