Welcome! Power BI User Group (PUG) Copenhagen
All things R with Power BI David L. Bojsen Cloud Solution Architect, Advanced Analytics and AI Microsoft Denmark
Meet Your Presenter David L. Bojsen Previously application/integration developer Past 11 years focus on data and BI Past 2 years focus on Cloud, IoT at Microsoft aka.ms/davidb
Session Agenda Session objectives What is R Setting up your environment Data manipulation/enhancement thru R Visualizing data thru R Support for R in the Power BI Service When to use R in Power BI
Poll How many consider themselves a data scientist? a BI professional? a BI superuser?
Poll How many are completely new to R?
All things R with Power BI At the end of this session, you should be better able to… Understand the possibilities for using R in Power BI Know how to go home and set up your own environment
What is R Wikipedia: R (programming language)
What is R “R is a language and environment for statistical computing and graphics” Capabilities include Statistical Analysis Modeling and Data Visualization
What is R Source: http://www.kdnuggets.com/2016/06/r-python-top-analytics-data-mining-data-science-software.html
Setting up your environment
We will need... Power BI Desktop An R installation – suggest Microsoft R Open (Optional) An R IDE R Studio R Tools for Visual Studio (RTVS) Update configuration in Power BI Desktop
Demo
Data manipulation/enhancement
Going all in - the R script data connector Running R Scripts in Power BI Desktop
Things to be aware of Reference all dependent packages Only data frames are imported (not complex/vectors) All data frames available in navigator NA is translated to NULL 30 minute time out
Demo
Partial approach - R script as part of query editor Using R in Query Editor
Demo
Data visualization
R visuals from Office store Advanced Analytics Custom visuals for Power BI
Your own custom R visualizations Create Power BI visuals using R
Current limitations Data size limitations – data used by the R visual for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used and a message is displayed on the image. Calculation time limitation – if an R visual calculation exceeds 5 minutes the execution times out, resulting in an error. Relationships – as with other Power BI Desktop visuals, if data fields from different tables with no defined relationship between them are selected, an error occurs. R visuals are refreshed upon data updates, filtering, and highlighting. However, the image itself is not interactive and cannot be the source of cross-filtering. R visuals respond to highlighting other visuals, but you cannot click on elements in the R visual in order to cross filter other elements. Only plots that are plotted to the R default display device are displayed correctly on the canvas. Avoid explicitly using a different R display device.
Interactive R custom visuals Interactive R custom visuals support is here!
Your own interactive R custom visuals Building R Powered Custom Visual with HTML output
Bringing it from your machine into the Power BI Service
What is supported in the Power BI Service Data manipulation / enhancement Only supported with the On-Premises data gateway setup in personal mode Visuals / interactive visuals A subset of CRAN packages are supported R packages in the Power BI service You can request packages to be added
Demo
When to use R in Power BI
When to use R in Power BI No dedicated modeling capability (read: small R implementations) Robust visualizations; beyond what Power BI can provide Augment Power BI, don’t try to replace it Data manipulation beyond DAX capabilities Integrating R modeling capabilities into PowerQuery
Questions?
Thank you for Attending! Don’t forget to join your local PUG to enjoy year-round networking and learning. www.pbiusergroup.com/denmark www.pbiusergroup.com/sweden www.pbiusergroup.com/gebruikersgroep