Try and Catch in Power Query | Smarter way to work with errors in Power Query⚠️

Поделиться
HTML-код
  • Опубликовано: 20 дек 2024

Комментарии • 49

  • @GoodlyChandeep
    @GoodlyChandeep  Год назад

    Check out our newly launched M Language course ↗ - goodly.co.in/learn-m-powerquery/

  • @cristian.angyal
    @cristian.angyal 2 года назад +2

    Great video Chandeep!
    Didn’t know Message.Format and Message.Parameters made it to Excel 😜
    Thanks for sharing!

  • @syrophenikan
    @syrophenikan 2 года назад +4

    Here's an alternative function to determine the embedded error message:
    = Table.AddColumn(Source, "NewPrice", each try [Price]
    catch(err) =>
    if err[Message.Parameters]{0} = "#DIV/0!" then 10
    else
    if err[Message.Parameters]{0} = "#N/A" then 5
    else 0)

  • @dapperlink
    @dapperlink 2 года назад +1

    Wow! Just WoW! I have a feeling there’s going to be more bennies coming out of this feature.

  • @antoniojosemoraesdoprado2042
    @antoniojosemoraesdoprado2042 Год назад

    You are always very good at addressing the issues straight to their points in a very clear way.

  • @jenniferpavey1
    @jenniferpavey1 8 месяцев назад

    Oh my word I’m blown away - so efficient compared to how I was accomplishing this before

  • @fahimreza1377
    @fahimreza1377 2 года назад +1

    Being a newbi its a great lesson... Thanks mate!!

  • @paulgallagher2987
    @paulgallagher2987 2 года назад +1

    This is so helpful. Thank you Chandeep!

  • @brianjulius6401
    @brianjulius6401 2 года назад +1

    Crystal clear explanation and great additional recommended resources. Thanks, Chandeep!

  • @GrainneDuggan_Excel
    @GrainneDuggan_Excel 2 года назад +1

    Thanks Chandeep for the clear explanation of try catch and the link to the MS documentation for it!

  • @alexrosen8762
    @alexrosen8762 2 года назад +1

    Wow! Great stuff thanks

  • @YouExcelTutorials
    @YouExcelTutorials 2 года назад +1

    Very well explained👏
    Thanks for sharing Chandeep!

  • @cjimmer4877
    @cjimmer4877 2 года назад +1

    Amazing. I love this!

  • @krishnakishorepeddisetti4387
    @krishnakishorepeddisetti4387 2 года назад +1

    I like your content a lot.... most of these are not present in normal power bi trainings

  • @martyc5674
    @martyc5674 2 года назад +1

    Brilliant content as always Chandeep 👍👍👍👍👍👍

  • @abhaydwiveddi3760
    @abhaydwiveddi3760 2 года назад +1

    hi chandeep it is very helpful video....
    one more thing I an struggling with the direct query these days can you please help me to solve this issue....
    I am unable to do transformations and merging, filtering in power query.

  • @siddheshamrutkar8684
    @siddheshamrutkar8684 2 года назад +1

    Superb.... 👍

  • @Gorman-84
    @Gorman-84 8 месяцев назад

    Nice job. Thanks.

  • @shoaibrehman9988
    @shoaibrehman9988 2 года назад +1

    It is awesome content. 👌 Sir if you can explain DAX bit advance level it will be good. I have raise one query from many power bi experts and Dax champ no one come back with appropriate solution.
    In future video could you pls explain running total by category and by month both together.
    Means in each month like Jan ,feb ....etc i can calculate running total of all orders of all products.

  • @fdoublef2008
    @fdoublef2008 2 года назад

    Helpful video, thank for sharing. And I want to know what your screen record app? thank you!

  • @BORISVLEONOV
    @BORISVLEONOV 9 месяцев назад

    You saved me!. Subscription.)

  • @Rice0987
    @Rice0987 2 года назад

    A bit not exactly my topic, but as usually interesting, so thanks! :)

    • @GoodlyChandeep
      @GoodlyChandeep  2 года назад

      Glad you enjoyed it!

    • @Rice0987
      @Rice0987 2 года назад

      @@GoodlyChandeep your videos are always enjoy. :)

  • @BrainyBrunetteBarbie
    @BrainyBrunetteBarbie 2 года назад

    You always crack me up…”what the HELL is a try and a catch???”

    • @GoodlyChandeep
      @GoodlyChandeep  2 года назад

      Haha..thanks! 💚

    • @BrainyBrunetteBarbie
      @BrainyBrunetteBarbie 2 года назад

      @@GoodlyChandeep Of course! It’s nice to see someone else making excel puns and asking the *real* questions. Haha
      Any chance there’s a way to do find and replace in the advanced editor? Right now I’m copying / pasting the code into MSFT Word to edit, then pasting it back. Maybe it’s something that won’t be as much of an issue as my M Code improves.

  • @krishanphophalia9303
    @krishanphophalia9303 Год назад

    Awesome ❤

  • @brunalima7145
    @brunalima7145 Год назад

    wow, that's very good, thanks ❤

  • @frachiar4444
    @frachiar4444 10 месяцев назад

    I still use Excel 2016 ... maybe is this the reason why gives me sintax error?

  • @shikharai9378
    @shikharai9378 6 месяцев назад

    How i should do this for entire table instead of only one column?

  • @krishnakishorepeddisetti4387
    @krishnakishorepeddisetti4387 2 года назад +1

    first like.. first comment...

  • @shanestocks89
    @shanestocks89 5 месяцев назад

    Mine acts weird. When I use try I only get FALSE with a error in the window saying "DataFormat.Error Invalid Cell value "#N/A". I am seriously struggling to find this error, I have a table with a million rows and it stops the whole query. I cant even use a blanket remove error it still says dataformat.

  • @alirezahossini463
    @alirezahossini463 2 года назад

    Because message error is unique you can use text.contains

  • @milindbhende3043
    @milindbhende3043 11 месяцев назад

    How to catch "DB connection Time out" error in Power Query?

  • @ziadelmokadem5452
    @ziadelmokadem5452 2 года назад

    I am trying to use try otherwise and if then with two arguments, but it doesn't work (with two merges), any idea how to do two merges in the same step ? the argument =try Table.ExpandTableColumn(#"Merged Queries1", "Table1", {"A", "B"})otherwise Table.ExpandTableColumn(#"Merged Queries1", "Table3", {"A", "B"})

    • @MrDonkey912
      @MrDonkey912 Год назад

      Hopefully youtube doesn't break the formatting. here's what you want
      = try Table.ExpandTableColumn(#"Merged Queries1", "Table1", {"A", "B"})
      catch (e) => Table.ExpandTableColumn(#"Merged Queries1", "Table3", {"A", "B"})
      try `otherwise` is the old format, you lose any potential error information, or that there even was an error.