Table.ReplaceErrorValues
Sintassi
Table.ReplaceErrorValues(table as table, errorReplacement as list) as table
Informazioni su
Sostituisce i valori di errore nelle colonne specificate di table
con i nuovi valori nell'elenco errorReplacement
. Il formato dell'elenco è {{column1, value1}, ...}. È consentito un solo valore di sostituzione per colonna. Se si specifica la colonna più di una volta, verrà generato un errore.
Esempio 1
Sostituire il valore di errore con il testo "world" nella tabella.
Utilizzo
Table.ReplaceErrorValues(
Table.FromRows({{1, "hello"}, {3, ...}}, {"A", "B"}),
{"B", "world"}
)
Output
Table.FromRecords({
[A = 1, B = "hello"],
[A = 3, B = "world"]
})
Esempio 2
Sostituire il valore di errore nella colonna A con il testo "hello" e nella colonna B con il testo "world" nella tabella.
Utilizzo
Table.ReplaceErrorValues(
Table.FromRows({{..., ...}, {1, 2}}, {"A", "B"}),
{{"A", "hello"}, {"B", "world"}}
)
Output
Table.FromRecords({
[A = "hello", B = "world"],
[A = 1, B = 2]
})