Update your report based on a website

A quick hack today. Got this question from someone who needed to be able to update a report and show users that something had changed. This is easy when you have access to a database and can add data to it but in this case that was not possible.

So I came up with a hacky (and great :P) way to do this. and wanted to share it in case it came handy in your box of tricks :).

Instead of using a database I am going to make use of Power BI desktops wide range of datasources and connect to a web page that is under my control. This can be a page on sharepoint, the web, the intranet, wordpress, doesn’t matter. In this example I am connecting to my own blog page: https://www.kasperonbi.com/on-demand-webinar-strengthen-your-data-modeling-skills-with-power-bi/

On this page I added some text and colored it white. No one will see it :). The color part is optional though.

Next I load this page into Power BI dekstop. I am using a new M function called “Web.BrowserContents” to get just the raw content

Next I am adding a new column that searches for the existence of the string “version1″ using Text.Contains([Column1],”version1”)

Now that I have this I can remove the original column containing all the HTML text (no need to store that in memory) and write a measure using the data I just got.

VersionText =
IF ( VALUES ( containsversion[ContainsV1] )“No update”“Update” )

Now the text in my report changes if I update the text my blog post. Simple but effective.

You can take this much further of course and even have the text shown come from the page or have it trigger conditional formatting and so on.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.