Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Trying to retrieve data (Get data) 'From Web' https://en.wikipedia.org/wiki/List_of_nearest_stars_and_brown_dwarfs.
When I select the second HTML table 'Known star systems within 20 light-years....' it only shows 5 columns, whereas there are actually 11 columns. Any clue what's happening here? Somehow I believe this worked fine in earlier versions of Power-BI.
Seen some solutions that mention opening the web page with Lines.FromBinary, instead of Web.Page, followed by a whole lot of hardcoded lines, but surely this ain't a very friendly way for accessing data that is clearly already formatted in proper tabular format.
Solved! Go to Solution.
Hi @MarCat ,
Could this code return correct table?
let
Source = Web.BrowserContents("https://en.wikipedia.org/wiki/List_of_nearest_stars_and_brown_dwarfs"),
#"Extracted Table From Html" = Web.Page(Source),
Data = #"Extracted Table From Html"{1}[Data]
in
Data
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes, that worked. However, having said that, it hardly makes using Power BI any friendlier. Power BI works great for simple stuff, but any time you're faced with a real-world problem it doesn't seem up to the task, which is kind of really disappointing. Anyways, thanks for your time and support, that's really appreciated and makes using this community part of Power BI really worthwhile.
Hi @MarCat ,
I can get all columns using the Web.Page function.
let
Source = Web.BrowserContents("https://en.wikipedia.org/wiki/List_of_nearest_stars_and_brown_dwarfs"),
#"Extracted Table From Html" = Web.Page(Source),
Data = #"Extracted Table From Html"{1}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data,{{"Designation System", type text}, {"Designation Star or (sub-) brown dwarf", type text}, {"Distance (ly (±err))[6]→→", type text}, {"Constellation", type text}, {"Coordinates: RA, Dec (Ep J2000, Eq J2000)[5]", type text}, {"Stellar class", type text}, {"Mass M☉", type text}, {"Magnitude (mV[5] or mJ) App.", type text}, {"Magnitude (mV[5] or mJ) Abs.", type text}, {"Parallax (mas (±err)) [5][note 1]", type text}, {"Notes and additional references", type text}})
in
#"Changed Type"
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Nope... If I try the above script then I get the following error:
Expression.Error: The column 'Coordinates: RA, Dec (Ep J2000, Eq J2000)[5]' of the table wasn't found.
Details: Coordinates: RA, Dec (Ep J2000, Eq J2000)[5]
Hi @MarCat ,
Could this code return correct table?
let
Source = Web.BrowserContents("https://en.wikipedia.org/wiki/List_of_nearest_stars_and_brown_dwarfs"),
#"Extracted Table From Html" = Web.Page(Source),
Data = #"Extracted Table From Html"{1}[Data]
in
Data
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes, that worked. However, having said that, it hardly makes using Power BI any friendlier. Power BI works great for simple stuff, but any time you're faced with a real-world problem it doesn't seem up to the task, which is kind of really disappointing. Anyways, thanks for your time and support, that's really appreciated and makes using this community part of Power BI really worthwhile.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
39 | |
24 | |
21 | |
21 | |
13 |