Ops, vê se este script te ajuda:
let
Fonte = Excel.Workbook(File.Contents("C:\Users\afdum\Downloads\duvida_M_mes.xlsx"), null, true),
Estrutura_Inicial_Sheet = Fonte{[Item="Estrutura_Inicial",Kind="Sheet"]}[Data],
#"Cabeçalhos Promovidos" = Table.PromoteHeaders(Estrutura_Inicial_Sheet, [PromoteAllScalars=true]),
#"Coluna em pivô" = Table.Pivot(Table.TransformColumnTypes(#"Cabeçalhos Promovidos", {{"INICIO_LOTACAO", type text}}, "pt-BR"), List.Distinct(Table.TransformColumnTypes(#"Cabeçalhos Promovidos", {{"INICIO_LOTACAO", type text}}, "pt-BR")[INICIO_LOTACAO]), "INICIO_LOTACAO", "CENTRO_CUSTO", List.Sum),
#"Tipo Alterado" = Table.TransformColumnTypes(#"Coluna em pivô",{{"01/10/2023", type text}, {"01/09/2023", type text}, {"01/08/2023", type text}, {"01/07/2023", type text}, {"01/06/2023", type text}, {"01/05/2023", type text}, {"01/04/2023", type text}, {"01/03/2023", type text}, {"01/02/2023", type text}, {"01/01/2023", type text}, {"MATRÍCULA", type text}}),
ReplaceTodasColunas = (DataTable as table, DataTableColumns as list) =>
let
Contador = Table.ColumnCount(DataTable),
ReplaceCol = (DataTableTemp, i) =>
let
colName = DataTableColumns{i},
ReplaceTable = Table.ReplaceValue(DataTableTemp,each Record.Field(_, colName), each if Record.Field(_, colName) is null then "n/a" else Record.Field(_, colName),Replacer.ReplaceValue,{colName})
in
if i = Contador-1 then ReplaceTable else @ReplaceCol(ReplaceTable, i+1)
in
ReplaceCol(DataTable, 0),
todasColunas = Table.ColumnNames(#"Tipo Alterado"),
#"Apos Replace" = ReplaceTodasColunas(#"Tipo Alterado", todasColunas)
in
#"Apos Replace"