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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.