Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

REST API and Power BI Desktop



I have successfully used the REST API to create a new dataset, table and have added rows to the table.


If I create exactly the same dataset in the Desktop tool (i.e. same dataset name, same table name, same column names in the table and same column data types), then publish that to Power BI Online, then try to use the REST API to add rows to that table, I get HTTP 400 "Bad Request".  Should this be possible?


I asked the above question via the online "chat" feature and, after a delay while the chat-agent checked with an engineer, was told this is possible now, but not supported (though I haven't been able to get it to work at all).


Is it possible to add rows to datasets/tables created in the Desktop tool?  Do I have to create the model in a certain way in the desktop tool?  


If not, how can measures be used with data inserted via the REST API? - since (other than basic COUNT, SUM), these can only be created in the Desktop tool.


If measures can't be used with data inserted via the REST API, this seems like a huge limitation for real-time dashboards and will significantly limit the usefulness of the REST API...





Advocate I
Advocate I

If the various fragments of documentation littered around the place had at least mentioned that "no, you can't use RESTAPI-pushed data with Power BI Desktop," it would have saved us so much time and frustration.


Instead, they're all "Yeah, you can push data! Here's how you do that thing, which is not at all going to do what you think it does, but you won't figure that out until you've wasted far too much time, ha ha!"

Advocate II
Advocate II

I have found the same limitations (no DAX measures + can only write to datasets that were created via API). As a workaround I have pushed the data to Google Drive instead and PBI is grabbing the data from there. But as you mentioned, this does not support real-time updates, which is a shame.

Yes, I think this feature is so elementary.  I don't understand why it is not available in Power BI.

@fso The way you use with google drive, do you have such kind of regulary updates? I mean a real time update?

@MbPro yes you do, kind of.
Google Apps Script allows you to set triggers (every minute, hour, etc.) which work just like cron jobs.
But there is a limitation on the PowerBI-Side how often you can refresh per day.

So you can schedule refreshs but to get "real time" you would probably have to use the PowerBI API instead.

Helpful resources

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Kudoed Authors