Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Auto adding column from Web/HTML table

So I have a report that reads a table from a web source, and every now and then it updates with another column, which I then want to appear when I refresh data in Power BI.

Right now when I hit refresh it just updates the current rows and columns, but doesn't add the new column. Is there any way to automate this without me having to manually go into the advanced editor in the Transform data tab?

 

Thanks

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

v-lionel-msft_0-1622709434880.png

Yes, I reproduced your problem. Web data sources do have this problem.

v-lionel-msft_1-1622709981219.png

The reason for this problem is that the second parameter of Html.Table() is hard-coded.

 

v-lionel-msft_2-1622711538221.png

So I recommend using Python scripts in Power Query to get web data source data.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

6 REPLIES 6
andrew_bouland
Frequent Visitor

Apologies for posting to an old thread but was having similar issues and found plenty of suggestions when the data source is csv file and there is a Column number statement in the advanced editor.  When retrieving data from a web source, this Column number may not be specified in the Advanced Editor though.

 

This post helped me find my problem: https://powerusers.microsoft.com/t5/Power-Query/Missing-column-when-refreshing/td-p/1072968

 

In Advanced Editor under Query Editor, at the top, look for section re: #"Expanded records1" = Table.ExpandRecordColumn(#"Expanded records", "records", {".....  There are two sections within this line and you need to add your new column(s) to both.  If you only add to bottom or top section then you'll get an error re: Expression.Error: We expected newColumnNames to have the same number of items as fieldNames.
Details:
[List]

 

 

 

 

 

v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

v-lionel-msft_0-1622709434880.png

Yes, I reproduced your problem. Web data sources do have this problem.

v-lionel-msft_1-1622709981219.png

The reason for this problem is that the second parameter of Html.Table() is hard-coded.

 

v-lionel-msft_2-1622711538221.png

So I recommend using Python scripts in Power Query to get web data source data.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

Thanks for the reply, 

But I couldn't really see anything that help, maybe I missed something.

 

The problem isn't connecting and retrieving + transforming data.

The "problem" is when I that table updates and adds another column. And then doesn't appear in Power BI. Atleast not what I can see. 

So maybe there's something in advanced editor or something that can be done to auto add new columns?

 

Thanks 

amitchandak
Super User
Super User

@Anonymous , Check if power bi cmdlets, can help

https://powerbi.microsoft.com/en-us/blog/working-with-powershell-in-power-bi/

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Thanks for the reply, but unfortunately for this I can't rely on Power shell. And I didn't see anything about auto adding columns from web source that has already been imported and transformed? Maybe I misread 

thanks

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.