Tuesday, December 22, 2020

"this dataset won't be refreshed" error in PowerBi service when using Web.Contents

If you get the "This dataset wont be refreshed" error in PowerBi online and the dataset refreshes fine in PowerBi Desktop, then one reason maybe in how you are using Web.Contents.

The first thing you should do is check your "Data Source Settings" in PBI-Desktop and check to see if you get the "Some data sources may not be listed because of hand-authored queries". (See: https://docs.microsoft.com/en-us/power-bi/connect-data/refresh-data#refresh-and-dynamic-data-sources for more info)


For a majority of users, this is most likely happening on the usage of Web.Contents.

Here is some code that caused this error for me:

uri = "https://login.microsoftonline.com/" & tenantID & "/oauth2/token",
xxx = Web.Contents(uri, [Headers = authHeaders, Content = Text.ToBinary(authQueryString)])

The problem with the above code is that PBI service does not like to refresh URLs that are computed on the fly. So to fix the above code all you have to do is, pass the dynamic parts as a RelativePath, like so:

uri = "https://login.microsoftonline.com/",
relativePath = tenantID & "/oauth2/token",
xxx = Web.Contents(uri, [RelativePath =relativePath,  Headers = authHeaders, Content = Text.ToBinary(authQueryString)])


More info: https://docs.microsoft.com/en-us/powerquery-m/web-contents

Sunday, December 20, 2020

WeDo 2.0 Lego Spirograph Instructions

Instructions for building a Spirograph using a WeDo 2.0 Kit.

https://docs.google.com/presentation/d/1DZxw8S1ywhT5uZlFYH0v5XoyK4H0_8Pl_4SF1wsdLgs/edit?usp=sharing 




Based on instructions from: https://docs.google.com/presentation/d/1uxqmkhz1k8XyKeexrwzewM4RkaOjoA0kTO4Rs_mhsLc/