I think we should be clear here what we are after:
A. VBA in PowerBi
B. VBA/External clients ability to control/automate PowerBI (I.E. PowerBI hosting a COM server and exposes a type library)
I think most requests above are calling for Option B, which really has little to do with VBA.
In such a case, we'd really be looking for 4 things:
Here's an example of what I'd suggest:
Dim obj as PowerBI.Application: set obj = CreateObject("Power.BI.Application")
Dim report as PowerBI.Report: set report = obj.open("my/file.pbix")
Dim customConn as object: set customConn = new MyCustomConnection
.dax = "..."
Dim vData: vData = .queries.data
No doubt, is a feature too much required.
Please VBA for Power BI
VBA should be supported in all Microsoft Apps, including Power BI
Yes, Vote for Power BI with VBA
YES to VBA for Power BI, please
I would like to have a PBI Add-In, tool, or control for use in MS Access that could be automated using VBA.
I have a lot of National Fish Hatchery data (over 30 years) in MS Access and SharePoint lists. We use MS Access for data entry at 12 National Fish Hatcheries and currently store the data in an Access database file for each Hatchery since they have slightly different operations and requirements at each one. There are a lot of business rules and calculations in VBA code that would require a lot of work to reprogram in another software.
I currently have a Dashboard.pbix file for each hatchery database that is linked to the Access database backend and is opened in PBI Desktop from a button on a form using VBA shell code.
Private Sub cmdPBIDashboard_Click()
Dim Shex As Object
Set Shex = CreateObject("Shell.Application")
Shex.Open (Application.CurrentProject.Path & "\Dashboard.pbix")
I would also like to use VBA in PBI to automate interactive reports. I would really like to have a PBI control (like the web browser or MS Graph control) or tile (like Power Apps) available to use inside MS Access on forms and reports. Or a PBI Add-In that could be customized using VBA.
Please consider this