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
Jennie
Regular Visitor

Need to apend data from folder, in case some files have column names in other language

I use data from a folder, where different users put data snapshot from a system during their shift. Some users login wih english, and some wih local language. Due to that in some files the same columns have name in local language. There around 4 columns with 2 possible versions of name. How can i make power query to apend the data from these colums using condition like "if column name is "date" or "дата" then appen it to date column"?
3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Jennie ,

Have you solved your problem with the suggestion of Greg_Deckler ?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share some data sample which could reproduce your scenario and your desired output so that we could help further on it.

Best  Regards,
Cherry

 

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

Remove your Promote Headers step, remove your 1st row and base everything around Column1, Column2, etc. and then at the end, rename these columns to their proper names?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

hello, I went through the steps,which were created automatically during connection and expanding the tables and I could not find the moment when the headers have been added. the first step after expanding the table already has headers. Below I have copied the M text. I do not know M, it was created automatically, but maybe it could help to understand what I have done.2019-08-06 20_34_07-Admiral reports - Power Query Editor.png2019-08-06 20_35_16-Admiral reports - Power Query Editor.png

 

let
    Source = Folder.Files("R:\Materials\External warehouse\Адмирал\WH backup morning stock"),
    #"Removed Other Columns" = Table.SelectColumns(Source,{"Content", "Name"}),
    #"Extracted Text Before Delimiter" = Table.TransformColumns(#"Removed Other Columns", {{"Name", each Text.BeforeDelimiter(_, ".xls"), type text}}),
    #"Changed Type" = Table.TransformColumnTypes(#"Extracted Text Before Delimiter",{{"Name", type date}}),
    #"Filtered Hidden Files1" = Table.SelectRows(#"Changed Type", each [Attributes]?[Hidden]? <> true),
    #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File from WH backup morning stock", each #"Transform File from WH backup morning stock"([Content])),
    #"Removed Columns" = Table.RemoveColumns(#"Invoke Custom Function1",{"Content"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Columns", "Transform File from WH backup morning stock", Table.ColumnNames(#"Transform File from WH backup morning stock"(#"Sample File (2)"))),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Table Column1",{{"Name", "date"}}),
    #"Changed Type2" = Table.TransformColumnTypes(#"Renamed Columns",{{"Материал", type text}, {"Описание материала", type text}, {"Batch", type text}, {"Storage Type", type text}, {"Storage Bin", type text}, {"Storage Unit Type", type text}, {"Storage Unit", type text}, {"Stock Category", type text}, {"Завод", type text}, {"Available stock", type number}, {"Base Unit of Measure", type text}, {"Storage Location", type text}, {"SLED/BBD", type date}}),
    #"Renamed Columns1" = Table.RenameColumns(#"Changed Type2",{{"Base Unit of Measure", "UoM"}, {"Storage Unit Type", "Pal Type"}}),
    #"Inserted First Characters" = Table.AddColumn(#"Renamed Columns1", "Start3", each Text.Start([Описание материала], 3), type text),
    #"Added Conditional Column" = Table.AddColumn(#"Inserted First Characters", "material type", each if [Материал] = null then "load issue" else if Text.StartsWith([Материал], "5") then "Pack" else if Text.StartsWith([Материал], "9") then "Pack" else if Text.StartsWith([Материал], "3") then "Ingred" else if Text.StartsWith([Материал], "4") then "FG" else if [Start3] = "WRC" then "WRC" else if [Start3] = "CTD" then "WIP" else if Text.StartsWith([Start3], "TM") then "Trim" else if [Start3] = "SHT" then "WIP" else "Ingred"),
    #"Renamed Columns2" = Table.RenameColumns(#"Added Conditional Column",{{"Start3", "Type"}})
in
    #"Renamed Columns2"

 

--------------------

I have only 3 bilingual columns, which I would like Power Query to understand automatically as one column name:

Material = Материал

Material description = Описание Материала

Plant = Завод

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.