I have been asked to make a bunch of charts for a large organization and have been given access to their Power BI dashboard. I want to go around Power BI's interface so I can make the charts in R. Power BI offers an 'analyse in excel' option which lets you download an .odc file to open in excel. The .odc file doesn't contain the data it just specifies a database connection for excel. However, this only works on a windows computer and I have a mac. If need be I will try to figure out how to install a Windows virtual machine but I thought I would first try here:
The .odc file specifies a connection type and string, e.g.
<odc:Connection odc:Type="OLEDB">
<odc:ConnectionString>Provider=MSOLAP;Integrated Security=ClaimsToken;
Identity Provider=https://login.microsoftonline.com/common,
https://analysis.windows.net/powerbi/api, 929d0ec0-7a41-4b1e-bc7c-b754a28bddcc;
Data Source=pbiazure://api.powerbi.com;
Initial Catalog=2df8e9ba-9ee5-43fb-bbb0-ba622b9cdc2b;
MDX Compatibility= 1; MDX Missing Member Mode= Error;
Safety Options= 2; Update Isolation Level= 2; </odc:ConnectionString>
I was hoping it would be possible to connect to the underlying database in R using dbplyr
or some other package but I am uncertain where to start. This answer for how to do it in python looks promising Reading a dataframe from an odc file created through excel using pandas but I got an error relating to my python installation. I'd rather get it to work in R.
Is there enough information in the .odc file to connect via dbplyr
?