none
Custom Column using Function - How to Continue on Error RRS feed

  • Question

  • I'm using Wolfram Alpha from Azure Data Marketplace API. I'm using a list of Zipcodes in Excel. I've created a concatenated column that merges Zipcode (column a) with "Population for Zipcode & ColumnA" & passing that column to the Wolfram Alpha function to get back each zipcode's population.

    Works great until it gets to a Canadaian zip code, where Wolfram Alpha results with "unable to interrupt input", which I expect.

    But, how to you tell PowerQuery to simply proceed to the next line and don't stop when it encounters an error?

    Great tool.  Thanks.

    -Eric Vogelpohl

    Sunday, June 1, 2014 1:11 AM

Answers

  • The easiest workaround would be to filter for only US zip codes before calling to Wolfram Alpha, but if that's not possible, then I would recommend looking at the "try" expression. I'm not exactly sure why it's stopping the full evaluation instead of just putting an error value in that cell but wrapping the call in a try might help. It's covered in section 1.10 of the language spec:

    http://go.microsoft.com/fwlink/?LinkID=320633

    I'm happy to dig into this more if you want, especially if you can share the workbook.

    Monday, June 2, 2014 9:08 PM
    Moderator

All replies

  • The easiest workaround would be to filter for only US zip codes before calling to Wolfram Alpha, but if that's not possible, then I would recommend looking at the "try" expression. I'm not exactly sure why it's stopping the full evaluation instead of just putting an error value in that cell but wrapping the call in a try might help. It's covered in section 1.10 of the language spec:

    http://go.microsoft.com/fwlink/?LinkID=320633

    I'm happy to dig into this more if you want, especially if you can share the workbook.

    Monday, June 2, 2014 9:08 PM
    Moderator
  • Thanks Ben.  I'll give 'try' a try.

    I was hoping for a global 'on error, resume next' setting and use the "remove errors" feature before I apply it into the workbook.

    Appreciate it.

    Monday, June 2, 2014 9:30 PM