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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Chrisjr
Helper IV
Helper IV

Changing columns types except selected ones

Hello All, 

 

I have the following table: 

BrandCategoryMarchAprilMay
ABDOP500750807
ACPDO200850890
ADOOB150970750
AADOP680160690

 

I am trying to create a function that would change the column types of all columns expceted the columns Brand and Category. 

(The other column's names will always change. The column "Brand" and "Category" will always be the 2 first columns and their names will never change)

 

I have tried the following function but doesn't work: 
        = Table.TransformColumnTypes(#"End stage 3",
List.Transform(
List.RemoveFirstN(
Table.ColumnNames(Source),
2
),
each {_, Int64.Type}
))

 

I get an error message : "Expression.Error: The column 'Item' of the table wasn't found.
Details:
Item"

 

but nowhere in my table or transformations I have a column names Item. 

 

Anyone has an idea how I could achieve this? 

1 ACCEPTED SOLUTION
wdx223_Daniel
Community Champion
Community Champion

= Table.TransformColumnTypes(#"End stage 3",
List.Transform(
List.RemoveFirstN(
Table.ColumnNames(#"End stage 3"),
2
),
each {_, Int64.Type}
))

View solution in original post

3 REPLIES 3
Chrisjr
Helper IV
Helper IV

Super, many thanks @wdx223_Daniel .

What was my mistake? 

I see you replaced the source with the previous step. 

wdx223_Daniel
Community Champion
Community Champion

= Table.TransformColumnTypes(#"End stage 3",
List.Transform(
List.RemoveFirstN(
Table.ColumnNames(#"End stage 3"),
2
),
each {_, Int64.Type}
))

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.