SlideShare a Scribd company logo
Power BI with R
Guruprasad Vijayarao
3/21/2018
Agenda
• Why R in Power BI
• R integration in Power BI
• R Connector
• R & Power Query
• R Visuals
• Q&A
• Lab
What is R?
• Used by 2m+ data scientists, statisticians and analysts
• Flexible, extensible and comprehensive for productivity
• As seen in New York Times, The Economist and FlowingData
CRAN: 7000+ add-on packages for R
Power BI Dashboard Creation
Power BI: R Integration Points
R Connector R & Power Query R Visuals
R Connector
• Install R - https://docs.microsoft.com/en-us/power-bi/desktop-r-visuals
• Configure R Home Directory
• Packages and dependencies must be explicitly loaded
• Only Data Frames
• No Complex Type, No user inputs
• 30 minutes timeout
• Setwd to full path
• https://docs.microsoft.com/en-us/power-bi/service-r-packages-
support
Data
• Web Data Scrub - rvest, httr, rcurl, and others
• Complicated Data Transformation: dplyr, tidyr, lubrdiate, stringr…
• XML or JSON data: XML, jsonlite, and others
• RegEx to Scrub the data
• mice package to impute missing values
• tidytext package to assign sentiment scores to text inputs
• Export Data
Visuals
• External IDE
• Box Plot, Facet
• Corelations
• Regression
• Prediction
• Sentiment Analysis
R Visual Gallery
Data Refresh
• Privacy levels
• Personal Gateway
Limitations
• Data size limitations: 150,000 rows
• Calculation time limitation 5 minutes.
• Relationships.
• R visuals responses for cross-filtering but it cannot filter.
• R visuals respond to highlighting other visuals, but you cannot click on
elements in the R visual in order to cross filter other elements.
Resources
• Documentation:
• https://powerbi.microsoft.com/en-us/documentation/Powerbi-Service-R-Packages-Support
• https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-scripts
• R Visuals Gallery:
https://app.powerbi.com/visuals/R-powered
• R Script Showcase:
https://community.powerbi.com/t5/R-Script-Showcase/bd-p/RVisuals
Related Conent
• https://www.youtube.com/watch?v=SMaJf6UBKeI&t=591s
• https://www.blue-granite.com/tutorials/power-bi-and-r
Lab
• Sample
https://www.linkedin.com/pulse/embedded-hr-analytics-using-r-power-bi-andy-lowrey
• Source Code
https://github.com/lowreya/workforce-analytics-demo
Demo Script – Cheet Sheet
• Check the Notes below for scripts

More Related Content

PPTX
PPTX
PPTX
PDF
HANA Intro (KR)
PDF
Automating Regional Data Integration with Python & ArcPy (Heather Widlund)
PPTX
Best analytics tool
PDF
Pitkin Maps & More (Mary Lakner)
HANA Intro (KR)
Automating Regional Data Integration with Python & ArcPy (Heather Widlund)
Best analytics tool
Pitkin Maps & More (Mary Lakner)

What's hot (20)

PPTX
Distilled Power BI Updates for April 2016
PDF
How to Rebuild an End-to-End ML Pipeline with Databricks and Upwork with Than...
PPTX
Distilled Power BI Updates for April 2016
PPT
GIS As-Builts - How & Why
PDF
206560 p6 analytics 3 1
PDF
Building Robust Production Data Pipelines with Databricks Delta
PDF
RRDG Data Sharing Specifications
PPTX
Lift and Shift 20 Million Features with ArcGIS Data Interoperability
PPTX
Break on Through (To The Java(Script) Side) - Smart Development - Esri UK Ann...
PPTX
Check Point Big Data Forum m3
PDF
Esri Scotland Conf 2016 Web AppBuilder
PDF
Creative Ways to Leverage Operational Data
PDF
Analysing Web GIS apps
PDF
Activate 2019 - Search and relevance at scale for online classifieds
PDF
Apache Spark Listeners: A Crash Course in Fast, Easy Monitoring
PPTX
Azure Data Warehouse
PDF
Highland Garden Village Community GIS Data Viewer (Andrea Santoro, Laura Atki...
Distilled Power BI Updates for April 2016
How to Rebuild an End-to-End ML Pipeline with Databricks and Upwork with Than...
Distilled Power BI Updates for April 2016
GIS As-Builts - How & Why
206560 p6 analytics 3 1
Building Robust Production Data Pipelines with Databricks Delta
RRDG Data Sharing Specifications
Lift and Shift 20 Million Features with ArcGIS Data Interoperability
Break on Through (To The Java(Script) Side) - Smart Development - Esri UK Ann...
Check Point Big Data Forum m3
Esri Scotland Conf 2016 Web AppBuilder
Creative Ways to Leverage Operational Data
Analysing Web GIS apps
Activate 2019 - Search and relevance at scale for online classifieds
Apache Spark Listeners: A Crash Course in Fast, Easy Monitoring
Azure Data Warehouse
Highland Garden Village Community GIS Data Viewer (Andrea Santoro, Laura Atki...
Ad

Similar to Using R in power BI (20)

PPTX
Extending Power BI Functionality with R
PPTX
R in Power BI
PDF
Predictive Analysis using Microsoft SQL Server R Services
PDF
Analytics with R in SQL Server 2016
PPT
Tableau training in hyderabad
PPTX
Microsoft Data Platform Airlift 2017 Rui Quintino Machine Learning with SQL S...
PDF
Bluegranite AA Webinar FINAL 28JUN16
PDF
General Presentation - DIAD and AIAD, Dashboard and Apps
PDF
OTN EMEA TOUR 2016 - OBIEE12c New Features for End-Users, Developers and Sys...
PPTX
Office 365 Power Tools: What to use When? Forms, Flows, PowerApps, PowerBI
PDF
Extending the Reach of R to the Enterprise with TERR and Spotfire
PPTX
R training at Aimia
DOC
Resume (4)
PDF
Michal Marušan: Scalable R
PDF
Big Data Analytics with R
PDF
Hadoop and Your Enterprise Data Warehouse
PDF
Mohammed Shafiur Rahman-Resume
PDF
Business Analytics with R
PDF
Business Analytics with R
PPTX
Pinterest hadoop summit_talk
Extending Power BI Functionality with R
R in Power BI
Predictive Analysis using Microsoft SQL Server R Services
Analytics with R in SQL Server 2016
Tableau training in hyderabad
Microsoft Data Platform Airlift 2017 Rui Quintino Machine Learning with SQL S...
Bluegranite AA Webinar FINAL 28JUN16
General Presentation - DIAD and AIAD, Dashboard and Apps
OTN EMEA TOUR 2016 - OBIEE12c New Features for End-Users, Developers and Sys...
Office 365 Power Tools: What to use When? Forms, Flows, PowerApps, PowerBI
Extending the Reach of R to the Enterprise with TERR and Spotfire
R training at Aimia
Resume (4)
Michal Marušan: Scalable R
Big Data Analytics with R
Hadoop and Your Enterprise Data Warehouse
Mohammed Shafiur Rahman-Resume
Business Analytics with R
Business Analytics with R
Pinterest hadoop summit_talk
Ad

Recently uploaded (20)

PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
01-Introduction-to-Information-Management.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Business Ethics Teaching Materials for college
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Pharma ospi slides which help in ospi learning
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Cell Types and Its function , kingdom of life
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Pre independence Education in Inndia.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Renaissance Architecture: A Journey from Faith to Humanism
Week 4 Term 3 Study Techniques revisited.pptx
VCE English Exam - Section C Student Revision Booklet
01-Introduction-to-Information-Management.pdf
RMMM.pdf make it easy to upload and study
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Business Ethics Teaching Materials for college
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Pharma ospi slides which help in ospi learning
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Anesthesia in Laparoscopic Surgery in India
Cell Types and Its function , kingdom of life
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Pre independence Education in Inndia.pdf

Using R in power BI

Editor's Notes

  • #7: https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-scripts/ https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-in-query-editor/ https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-visuals/
  • #8: https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-in-query-editor/
  • #9: Write.table (dataset, file = “[PATH OF FILE]”, sep = “[SEPARATOR]”, row.names = FALSE)
  • #10: https://community.powerbi.com/t5/R-Script-Showcase/bd-p/RVisuals
  • #11: https://community.powerbi.com/t5/R-Script-Showcase/bd-p/RVisuals
  • #17: Use ‘data(package = .packages(all.available = TRUE))’ to list the data sets in all *available* packages. #------------------Visuals Density Chart plot(density(dat$StockValue)) abline(v = quantile(dat$StockValue, 0.05), col = "red") #------------------Visuals Correlation Chart data(mtcars) require("corrplot") library(corrplot) M <- cor(dataset) #Experiment different plotting parameters by uncommenting your preferred plotting instruction corrplot(M, method = "circle",type = "upper" , tl.srt = 0 ) #corrplot(M, method = "circle", order="hclust", addrect=2) #corrplot(M, method = "color", tl.cex=0.6, tl.srt = 45, tl.col = "black") #corrplot(M, method = "ellipse", type = "upper", tl.cex=0.6, tl.srt = 45, tl.col = "black") install.packages("corrplot") library(corrplot) M <- cor(mtcars) corrplot(M, method = "number") #------------------Venn Diagram install.package('VennDiagram') library(VennDiagram) v<-draw.triple.venn(dataset[1,1],dataset[1,2],dataset[1,3],dataset[1,4],dataset[1,5],dataset[1,6],dataset[1,7],c("First","Second","Third "),cex=1.2, cat.dist = c(0.1, 0.1, 0.1),cat.fontfamily = "plain", fontfamily = "plain")