From c92edade1f90af4a1664172287dec721e5aa9f3e Mon Sep 17 00:00:00 2001 From: Maxim Zelensky Date: Mon, 17 Oct 2016 18:12:00 +0300 Subject: [PATCH] Remove errors from list (not column) Takes list as input and returns the same list but without Error values. --- List.RemoveErrors.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 List.RemoveErrors.m diff --git a/List.RemoveErrors.m b/List.RemoveErrors.m new file mode 100644 index 0000000..7c02de2 --- /dev/null +++ b/List.RemoveErrors.m @@ -0,0 +1,15 @@ +(ListWithErrors as list) as list => +/* +Takes list as input and returns the same list but without Error values. +Useful when errors came to list/column from external source, and there are no possibility to eliminate errors before using a list + +Usage: += List.RemoveErrors({1,2,error "this is an error",4}) +returns +{1,2,4} +*/ + +let + CleanList = Table.RemoveRowsWithErrors(Table.FromColumns({ListWithErrors}))[Column1] +in + CleanList