Apply a transformation to new data table, csv etc

ilcaa

Well-known Member
Joined
May 25, 2005
Messages
751
Office Version
  1. 365
Platform
  1. Windows
i have a transformation on a table... i want to apply the same transformation on a new CSV file or Table basically a new "Source"

how do i "point" an existing transformation to a new different csv, or table or other input (obviously with same structure)

i created a function out of my original transformation, i imported a new data as a Table... when I try to invoke a function by Add New Column it ask me for a column name
what is the proper way to apply to new imported Source ? thanks

VBA Code:
(bin as binary) as table =>
let
    Source = Folder.Files(bin),
    
    promote= Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
      
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Product", type text}, {"ZN(COUNTD([accn_id]))", Int64.Type}}),
    #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"ZN(COUNTD([accn_id]))", "tests"}}),
    #"Removed Columns" = Table.RemoveColumns(#"Renamed Columns",{"Source.Name"}),
 
Last edited:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,215,205
Messages
6,123,634
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top