Quantcast
Viewing all articles
Browse latest Browse all 217233

Removing errors from list (not column) - in Power Query 'M'

Hi All,

cannot resolve some issues with lists containing errors in Power Query (Query Editor).

Suppose I have a list named ListWithError:

 

ListWithError = {"01-01-2016", 1,Date.From("this is not a date"), #date(2016,3,31)}

It equals:

 

01-01-2016

1

Error

3/31/2016

 

I would like to get a list of only dates, which (in case there are no errors in list elements) I can get with

ListOfDates = List.RemoveNulls(List.Transform(ListWithNoErrors, each try Date.From(_, "en-US") otherwise null))

But if there is an error in list, I cannot do this way, I got only one element in list

How can I remove element with error from list without transforming given list to column and applying Table.RemoveRowsWithErrors?

Tried List.Transform and List.TransfromManyList.Select etc., but no way

 

Thanks,

Maxim


Viewing all articles
Browse latest Browse all 217233

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>