Hi all,
I created a dataset in my Power BI workspace programmatically using the REST API - just defining a few simple tables, and then added some data to it, again, using the REST API. This is all based on https://powerbi.microsoft.com/en-us/guided-learning/powerbi-developer-walkthrough-push-data-add-rows/ and works fine.
I then used Power BI (Desktop) to create a .PBIX that points to this dataset and built reports around this data. I then uploaded the PBIX to my Power BI workspace, again, using the REST API, and verified that I can continue adding data to it after that.
Here's my problem: Assume I want to give my PBIX file to another user and give him a program that'll upload the PBIX to his workspace so he can see reports for his own data. The dataset doesn't exist under his account, so the upload fails. So I tried to modify my app to predefine the empty dataset, just like I did from my own account on my own system, and then upload the PBIX - however, that also fails. The Dataset ID (a GUID) that was just created is obviously different than the Dataset ID that's defined in my PBIX, so it's still just as if it didn't exist at all.
The whole reason I have a PBIX file I want to upload is that it contains report definitions, which I can't recreate programmatically.
I'm obviously missing something to accomplish what should be relatively straightforward: My users aren't sharing the same data; in fact they're in completely separate organizations. *I* don't have access to their data or accounts. However, they do have some data that my app can read - I want my app to read this data, upload it into a dataset, and upload a report (the whole reason I have a PBIX at all), and have my app continue uploading data to this dataset on a regular basis. All users are in different organizations and work independently. What are my options? Really, the only part I'm missing is getting a report created, that is using a dataset that was created programmatically.
Does this make sense? I hope this is somewhat coherent.