Wednesday, January 31, 2018

How to retrieve OData v4 fast in Power BI

I recently blogged about how Power BI has a bug which ignores the select statements when querying an OData v4 endpoint. Even though the columns would include any data, it still bugged me so much that I wanted to find a way around it.

Turns out that’s much easier than you would expect.

I recently explored some of the different data loading capabilities in PBI, and it turns out that there’s a Json.Document function which allows you to handle OData at an even lower level.

So what I did was take my original uri and query string: https://<org>$select=name

Then I put it into a Json.Document(Web.Contents())

And voila, this is the result


Navigating into that list, you can then right click the column and select “To Table”. This will present you with a table of records ready to be exploded:


So, time to do a little speed testing

Using: = OData.Feed("https://<org>$select=name")


Using: = Json.Document(Web.Contents("https://<org>$select=name"))


Enough said?

1 comment: