Power BI
Using Power BI and R
Tutorial here: Run R scripts in Power BI Desktop
The only twist that I want to add is an idea on how to enable users without admin access to run R code. This can be achieved by storing a portable r installation on a mountable file storage.
R
Download the necessary R installation in order to be able to execute R code.
Please note that running RStudio in the cloud gets really slow. I would only use the basic R installation and its GUI to install necessary packages.
Azure
Head over to Azure
- Create Storage Account
- Create File Storage
- Configure name, size and get connection string
Windows
Now you can mount the file storage.
Power BI
- Open the option and select the R installation folder
Note: that there is no pasting option and you have manually select the folder.
Columns vs Measures
Calculated columns (and tables) are:
- Evaluated for each row in your table, immediately after you hit ‘Enter’ to complete the formula
- Saved back into the model so take up space
Calculated Measures are:
- Evaluated when you use it in a visual, when the visual is rendered
- Not saved anywhere (well, actually there’s a cache in the report layer but it’s not part of the file when you hit Save)
Generally, measures are more useful, but the trade-offs are the performance hit (report runtime vs. pre-processed), storage space, and the type of expressions you can use. For example calculated columns are often used when you want to filter on the result rather than just as a calculated result.