Skip to content

Commit

Permalink
Merge pull request #1 from hohlick/hohlick-patch-1
Browse files Browse the repository at this point in the history
Remove errors from list (not column)
  • Loading branch information
hohlick committed Oct 17, 2016
2 parents 8d20462 + c92edad commit a7d6c16
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions List.RemoveErrors.m
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a7d6c16

Please sign in to comment.