Forum Discussion
Add the Source from a Web Page to the Table Created
- 3 years ago
This link led me down the path I think I need to go. I need to use the URL that is defined in the "Get data" and create a parameter. From this, I can then add that parameter as a field.
Solved: How to setting a dynamic URL connection - Microsoft Power BI Community
Regards,
Neil
= Text.From(Web.Contents([ColumnName]))Replace "ColumnName" with the name of the column that contains the HTML string. This should extract the URL from the HTML string and add it as a new column in the table.
If you want to extract specific information from the HTML string, you can use the "Document" functions in Power Query to parse the HTML and extract the desired information. For example, to extract the URL from the HTML string, you can use the following formula:
= Document.FromHtml([ColumnName]).UrlRobert,
This isn't working for me. Let me try to step through what I'm looking for again. The first step in this process is to "Get data", which I am doing from a web URL. Let's use the following as an example:
Demographics of China - Wikipedia
When this loads, I select the first table as what I want to import into Power BI. I then transpose the table and then promote the first row to the headers. The first step, which is to "Get data" has an applied step in Power Query Editor of
= Web.BrowserContents("https://en.wikipedia.org/wiki/Demographics_of_China")
It is the information within the quotes that I want to store as a field within the table. By doing this, if I select more than one table that might be on a page, I have a link to the source for each one and can ultimately link them together. The HTML on the page does not include the URL that is used in the beginning of the "Get data" process.
I hope this helps.
Thanks,
Neil