Forum Discussion
TMA
3 years agoFrequent Visitor
Connect to API in Power Query - Error: Block length does not match with its complement.
Hi, I am trying to connect to Free Open-Source Weather API | Open-Meteo.com through a new query. I can see the json file on https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&h...
- 3 years ago
I wrote a blog post with two solutions to this problem here:
https://blog.crossjoin.co.uk/2023/02/05/the-block-length-does-not-match-with-its-complement-error-in-power-query-in-power-bi-and-excel/Chris
Anonymous
3 years agoNot applicable
The above error is caused by that the data from your API is stored as a compressed JSON document, which is recognized as invalid format in Power BI Desktop.
In your scenario, you can use Power Query to retrieve data from your API and use the Binary.Decompress() function to extract the data.
For more details about how to retrieve data from API in Power Query, please review this similar thread.
For more details about how to use Binary.Decompress() function, please review this blog: Working With Compression In Power Query And Power BI Desktop.