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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
e2eProSysStaff
New Member

Adding columns based on other table column count

Hi,

I'm fairly new to Power BI and thought that this might be a good place to get some help

I need help adding a set of custom columns equal to the count of columns in another table. 

I can do this manually (as in create a custom column manually through query editor) but the names and counts of the columns in the tables are likely to change and i'd like to avoid having to constantly add or remove these custom columns.

 

Thanks

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@e2eProSysStaff ,

 

The requirement is not very clear. You may try Table.ColumnCount.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The requirement is to add as many columns into the main table as there is count of columns in another table.

So for example, if there is 15 columns in the other table I need to add 15 columns into my main table, or if there are 17 columns in the other table i need to add 17 columns into the main table. But the columns that need to be added into the main table have custom formulae, so I cant just join the two tables together.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors