cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sweet-T Member
Member

Removing Errors: Searching list for value in 2nd position; no values

Hi all: 

 

I'm grabbing the 2nd value from a list within Power query using the following code: 

#"2nd Recent Order" = Table.AddColumn(#"Found Most Recent Order", "2nd Latest Order", each [Order]{1})

As expected, I'm getting Errors for all rows in which there is only 1 Order (ie. no row [Order]{1}). That's not a problem. What is the best way to resolve these errors and replace with blanks/nulls? 


Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
LivioLanzo Super Contributor
Super Contributor

Re: Removing Errors: Searching list for value in 2nd position; no values

#"2nd Recent Order" = Table.AddColumn(#"Found Most Recent Order", "2nd Latest Order", each try [Order]{1} otherwise null )

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

2 REPLIES 2
LivioLanzo Super Contributor
Super Contributor

Re: Removing Errors: Searching list for value in 2nd position; no values

#"2nd Recent Order" = Table.AddColumn(#"Found Most Recent Order", "2nd Latest Order", each try [Order]{1} otherwise null )

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

Sweet-T Member
Member

Re: Removing Errors: Searching list for value in 2nd position; no values

Merci! 

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 45 members 1,136 guests
Please welcome our newest community members: