09-16-2016 03:18 AM - last edited 09-16-2016 03:20 AM
09-16-2016 03:18 AM - edited 09-16-2016 03:20 AM
Prerequisites (The sample .pbix files will not work without these prerequites completed)
1. Install R Engine
Power BI Desktop does not include, deploy or install the R engine. To run R scripts in Power BI Desktop, you must separately installR on your local computer. You can download and install R for free from many locations, including the Revolution Open download page, and the CRAN Repository.
2. Install the required R packages.
Download the R script attached to this message and run it to install all required packages on your local machine.
Required R packages:
CRAN 3.3.1, MRO 3.3.0, powerbi.com
10-25-2016 07:07 AM
This is great, exactly what I was looking for. I am quite new tto R, but was wondering......using the below script:
## Show schedule of projects by start / end date
library(ggplot2) # Visualization
# Convert timestamp to POSIXct. What do I do here to make the x-axis format to show yyyy/mm/dd? or alternatively mmm-yy?
ggplot(dataset,aes(x=datetime_start, y=dataset$Room, color=Person)) +
ggtitle("Room reservations for building X") + xlab("") + ylab("") + theme_bw()
Thanks again and keep up the good work!!
10-27-2016 04:36 PM - edited 10-27-2016 08:24 PM
Try adding a datetime scale similar to below:
scale_x_datetime(breaks = date_breaks("1 month"), labels=date_format("%d/%m/%Y"))
You may also want to turn the date on the X axis for easier reading
theme(axis.text.x = element_text(angle = 90))
P.S. You'll need to load library(scales) to use the scale_x_datetime function...
11-22-2016 02:36 AM
Thanks for your new R-showcases. They are very useful. If you consider to convert some of your R-visuals to R-powered-custom visuals, out team will be happy to assist you.
The visibility of R-powered custom visuals is greater and it is not limited for R-users.
07-13-2017 04:59 PM
Hey, I'm so green with R, I was wondering if you might be able to give me a head start. Literally, I started looking at it today after I saw your post.
How would you adapt this to a production process? That's what I want to do.
Say products "A" and "B" entering various different stages (1, 2, 3) of the development process.
Any head start would be really appreciated.
As a side note, it looks like your data model in PBI is really simple! I like that! I would totally build a simple table based off of referenced queries.
And you're just using a few lines of R to extract that and create the visual. It seems very cool!