I've been working on #PowerBits (a collection of #PowerShell scripts for #PowerBI 📊 #Admins) recently, and I just made a minor breakthrough. 💪😎👍
One of the biggest missing features of the Power BI #RESTAPIs right now is the ability to export a #Dataset as a #PBIX file. Of course, you can export a #Report as a PBIX file, and if that Report is bound to a Dataset, then the Dataset will be included with the Report when you export it. However, if the Dataset you need to export doesn't have a Report bound to it (I've started calling this a #BareDataset), then the #RESTAPI can't help you. That Dataset can only be exported manually from the Power BI Service using a web browser. Yuck! 🤮
To solve this problem:
1. Find and select a target #BareDataset
2. Upload a #BlankReport to the same #Workspace
3. Re-bind the blank Report to the bare Dataset
4. Export the blank Report as a PBIX file
5. Delete the blank Report from the Workspace
Step 1 Complete (mostly) 😅:
https://github.com/JamesDBartlett3/PowerBits/blob/main/PowerShell/Get-PowerBIBareDatasetsFromWorkspaces.ps1
