(Cleanpayrollfile)=>
let
Source = Excel.CurrentWorkbook(){[Name=Cleanpayrollfile]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type any}, {"Column3", type text}, {"Column4", type any}, {"Column5", type any}, {"Column6", type any}, {"Column7", type any}, {"Column8", type any}, {"Column9", type any}, {"Column10", type text}, {"Column11", type any}, {"Column12", type any}, {"Column13", type any}, {"Column14", type any}, {"Column15", type any}, {"Column16", type any}, {"Column17", type any}, {"Column18", type any}, {"Column19", type any}, {"Column20", type any}, {"Column21", type any}, {"Column22", type any}, {"Column23", type any}, {"Column24", type any}, {"Column25", type any}, {"Column26", type any}, {"Column27", type any}}),
#"Filled Down" = Table.FillDown(#"Changed Type",{"Column1"}),
#"Promoted Headers" = Table.PromoteHeaders(#"Filled Down", [PromoteAllScalars=true]),
#"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Column1", type text}, {"Column2", type any}, {"Column3", type text}, {"Column4", type any}, {"Column5", type any}, {"Column6", type any}, {"Column7", type any}, {"Column8", type any}, {"Column9", type any}, {"Employee ID", type text}, {"Gross Wages", type number}, {"EE Expense Reimb", type number}, {"FICA", type number}, {"Column14", type any}, {"FUTA", type number}, {"SUTA", type number}, {"EE Benefits", type number}, {"Life Ins", type number}, {"EAP", Int64.Type}, {"401K Match", type number}, {"Admin Fee", Int64.Type}, {"EE Setup Fee", Int64.Type}, {"Loan", Int64.Type}, {"LTD", type number}, {"STD", type number}, {"Imputed Income", type number}, {"Total Billed", type number}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type1",{{"Column1", "Department Name"}}),
#"Removed Top Rows" = Table.Skip(#"Renamed Columns",1),
#"Removed Columns" = Table.RemoveColumns(#"Removed Top Rows",{"Column3", "Column2", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Columns", each ([Employee ID] <> null)),
#"Removed Columns1" = Table.RemoveColumns(#"Filtered Rows",{"Total Billed", "Column14"}),
#"Reordered Columns" = Table.ReorderColumns(#"Removed Columns1",{"Department Name", "Employee ID", "Gross Wages", "FICA", "FUTA", "SUTA", "EE Expense Reimb", "EE Benefits", "Life Ins", "EAP", "401K Match", "Admin Fee", "EE Setup Fee", "Loan", "LTD", "STD", "Imputed Income"}),
#"Changed Type2" = Table.TransformColumnTypes(#"Reordered Columns",{{"Gross Wages", Currency.Type}, {"FICA", Currency.Type}, {"FUTA", Currency.Type}, {"SUTA", Currency.Type}, {"EE Expense Reimb", Currency.Type}, {"EE Benefits", Currency.Type}, {"Life Ins", Currency.Type}, {"EAP", Currency.Type}, {"401K Match", Currency.Type}, {"Admin Fee", Currency.Type}, {"EE Setup Fee", Currency.Type}, {"Loan", Currency.Type}, {"LTD", Currency.Type}, {"STD", Currency.Type}, {"Imputed Income", Currency.Type}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type2", {"Department Name", "Employee ID"}, "Attribute", "Value"),
//New Code
Part1= Table.SelectRows(#"Unpivoted Other Columns" , each ([Attribute] <> "Admin Fee")),
#"Filtered Rows2" = Table.SelectRows(#"Unpivoted Other Columns" , each ([Attribute] = "Admin Fee")),
#"Removed Columns2" = Table.RemoveColumns(#"Filtered Rows2",{"Department Name", "Employee ID"}),
#"Added Custom" = Table.AddColumn(#"Removed Columns2", "Department Name", each "HUM - HUM"),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Employee ID", each "D15334"),
Part2 = Table.ReorderColumns(#"Added Custom1",{"Department Name", "Employee ID", "Attribute", "Value"}),
Combined=Part1&Part2
in Combined