Power Query - Parameters with Error Checking (with bonus tip)

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ย. 2023
  • Learn how to check missing parameters using Power Query functions. Also, see how to make your M Code look beautiful.
    File Download Link:
    www.bcti.com/wp-content/YT_Do...
    00:25 Overview of the Problem
    01:55 Reviewing the Original Mission
    02:19 Error Checking Date Parameters
    05:54 Error Checking Text Parameters
    09:19 Making M Code Beautiful
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 42

  • @Donkeys_Dad_Adam
    @Donkeys_Dad_Adam หลายเดือนก่อน

    Brilliantly done. You've got a great voice, delivery and pace. I do a lot of these kinds of videos internally for my company and I like your style! Always great content and always appreciated!
    Also, if you have a large data set and want to save a step: I'm pretty sure you can combine your "Table.ReplaceValue" steps into one by doing something like:
    = Table.ReplaceValue( Table.ReplaceValue(#"Changed Type",
    null, #date(1899, 12, 30), Replacer.ReplaceValue ("{Start Date}")
    null, #date(2100, 12, 31), Replacer.ReplaceValue ("{End Date}"))

    • @bcti-bcti
      @bcti-bcti  หลายเดือนก่อน +1

      Thanks so much for your kind words and code contribution. I like to combine steps whenever possible, but I sometimes leave that out of my videos for the sake of clarity. Thanks for watching.

  • @SndfOmar
    @SndfOmar 2 หลายเดือนก่อน

    Your channel is so underrated! PQ learners really don't know what they are missing. Thank you very much for sharing. I find it hard to give a short name to your vids, as each vid has too much info.

    • @bcti-bcti
      @bcti-bcti  2 หลายเดือนก่อน +1

      Thanks so much for being a viewer. It gives me cause to do better. Thanks.

  • @hanifuzir9728
    @hanifuzir9728 7 หลายเดือนก่อน +5

    I super love your clarity and pace! Looking forward to watching more of your valuable lessons. And thank you so very much for sharing your wisdom.

    • @bcti-bcti
      @bcti-bcti  7 หลายเดือนก่อน

      Thank you for the nice comment.

  • @jazzista1967
    @jazzista1967 21 วันที่ผ่านมา

    Very nice error trapping techniques! This 2nd part came with a bang! Thanks again for such great content. I also use the Powerquery formatter for the code. The code in powerquery its very daunting at the beginning of your Mcode journey. Another thing that i do is that I rename all my steps without any spaces in order to avoid the "# " prefix which is also "scary " and this keeps a good hygiene in your code

    • @bcti-bcti
      @bcti-bcti  20 วันที่ผ่านมา +1

      I love the Power Query formatter. Good-looking code is a MUST! I also rename my steps to get rid of quotes and #. I teach all my students to do the same. Give people good habits from the beginning.

  • @ExcelUnlocked
    @ExcelUnlocked 2 หลายเดือนก่อน

    The transpose way is awesome and this is an amazing filter/clear filter way to do it, I used to do it in two steps, the filter then if the filter is empty refer to the previous step

    • @bcti-bcti
      @bcti-bcti  2 หลายเดือนก่อน +1

      Thanks. Glad it helped improve things for you. Thanks for watching.

  • @txreal2
    @txreal2 6 หลายเดือนก่อน +1

    I liked you GROUPBY video. It was detail and easy to understand.
    I've been using PQ for work but this Parameter tricks got me learning also from your other videos.
    I'm liked & subscribed. Thanks!

    • @bcti-bcti
      @bcti-bcti  6 หลายเดือนก่อน +1

      Thank you so much for subscribing. It makes us SOOooo happy to see the subs number go up.

  • @garyallan69
    @garyallan69 6 หลายเดือนก่อน +1

    Fantastic. Thank you so much. Very informative

  • @hafizzamzam6482
    @hafizzamzam6482 7 หลายเดือนก่อน +2

    i very much love this series. thanks a lot for this great storyline. looking forward for more !! 🥰🥰

    • @bcti-bcti
      @bcti-bcti  7 หลายเดือนก่อน

      Thank you!!!

    • @boissierepascal5755
      @boissierepascal5755 7 หลายเดือนก่อน +1

      Awsome ! I love your tutos. Thank you (Pascal from France)

  • @joannabird5264
    @joannabird5264 หลายเดือนก่อน

    Brilliant videos! Thanks

    • @bcti-bcti
      @bcti-bcti  หลายเดือนก่อน

      Our pleasure. Thanks so much for watching. 👍🏼👍🏼👍🏼

  • @fabianmolyneux2308
    @fabianmolyneux2308 6 หลายเดือนก่อน

    Again, a fantastic well explained video. I really appreciate the clear and straight-forward explanation of what steps are involved. I've been using Power Query for about 18 months, after having been a long-time advanced user of excel.
    I have found Power Query offers a great new dimension to data analysis, but my stumbling block has been around M Code and setting parameters. More often than not the instructional videos tend to over-complicate explanations on these aspects. However, your vid opens the door on this. I have learnt more from this vid and the preceding one than I have from months of dredging through other vids on the same topics. Thank you and pleased to have discovered you

    • @bcti-bcti
      @bcti-bcti  6 หลายเดือนก่อน

      As an educator, that is the highest compliment anyone could offer. You have made my year! I'm so thankful for your kind words.

    • @fabianmolyneux2308
      @fabianmolyneux2308 6 หลายเดือนก่อน

      You should take it as a compliment. Unfortunately, when it comes to learning new things I've been "the slow ship in the convoy" all my life. My break throughs have been down to nothing else but the great talents of people like yourself who have a knack of tapping into my wavelength. Thanks again

  • @dougmphilly
    @dougmphilly 6 หลายเดือนก่อน

    the newest excel god to mount olympus. these are fantastic.

  • @Mephistopheles019
    @Mephistopheles019 หลายเดือนก่อน

    Outstanding content!

    • @bcti-bcti
      @bcti-bcti  หลายเดือนก่อน

      Thank you. That’s very nice of you to say. We appreciate you taking the time to watch.

  • @descubriendopowerbi7899
    @descubriendopowerbi7899 7 หลายเดือนก่อน +2

    Good videos, thanks

    • @bcti-bcti
      @bcti-bcti  7 หลายเดือนก่อน

      Thanks for watching and commenting. You've made us happy!

  • @kebincui
    @kebincui 4 หลายเดือนก่อน

    awesome❤👍🌹

    • @bcti-bcti
      @bcti-bcti  4 หลายเดือนก่อน

      Thanks for taking the time to watch.

  • @tristangeoffroy9286
    @tristangeoffroy9286 3 หลายเดือนก่อน

    Hello, when you say, click on the runner to run the macro, you meant a real VBA macro, so your file is an xlsm type ? Or do you have another mean to trigger the PQ refresh? Like an office script?

    • @bcti-bcti
      @bcti-bcti  3 หลายเดือนก่อน +1

      There is a VBA macro "attached" to the runner icon that triggers a Power Query refresh. Thanks for watching.

  • @angellhycacamantigue1083
    @angellhycacamantigue1083 6 วันที่ผ่านมา

    How do you assign macro in Run icon?

  • @bulbulahmed3098
    @bulbulahmed3098 5 หลายเดือนก่อน

    ❤❤❤

  • @teekayjunior2517
    @teekayjunior2517 5 หลายเดือนก่อน

    I thought I might get there with the FILTER function. I could deal with the dates similar to your example, but I couldn't think of an easy way to deal with nulls in the other parameters. =SORT(FILTER(Table4,(IF($C$3="",DATE(1899,12,30),Table4[Date]>=$C$3))*(IF($C$4="",Table4[Date]

    • @bcti-bcti
      @bcti-bcti  5 หลายเดือนก่อน

      You should check out the follow-up video to this one that addresses nulls in other parameters. (Parameters with Error Checking)

    • @michaeldingee743
      @michaeldingee743 2 หลายเดือนก่อน

      I took the initial Dataset and created a table called Sales. Select anywhere on the dataset and CTRL + T and go to the Name Manager and rename it to "Sales."
      This is what I did using your formula as a start.
      =SORT(CHOOSECOLS(FILTER(Sales,(IF($C$3="",DATE(1899,12,30),Sales[Date]>=$C$3))*(IF($C$4="",Sales[Date]

  • @michaeldingee743
    @michaeldingee743 2 หลายเดือนก่อน

    Great Video. I was trying to use the new Groupby function you explained in another video to achieve the same result.
    This the formula for the Groupby function
    =GROUPBY(CHOOSECOLS(Sales,2,3,5,6),Sales[Sales],SUM,3,0,1,(Sales[Date]>=$AC$3)*(Sales[Date]

    • @bcti-bcti
      @bcti-bcti  2 หลายเดือนก่อน

      My guess is you’ll have to do something similar to the “check for blank” error checking as performed in the video.

    • @michaeldingee743
      @michaeldingee743 2 หลายเดือนก่อน

      This is my solution.
      =SORT(GROUPBY(CHOOSECOLS(Sales,2,3,5,6),Sales[Sales],SUM,3,0,1,(Sales[Date]>=$AC$3)*(Sales[Date]

    • @bcti-bcti
      @bcti-bcti  2 หลายเดือนก่อน

      @@michaeldingee743 Great job!!! Glad to see you putting the pieces together. 👍

  • @RajaMaja-zk3dz
    @RajaMaja-zk3dz 5 หลายเดือนก่อน

    how did you create the running icon?

    • @bcti-bcti
      @bcti-bcti  5 หลายเดือนก่อน

      That was inserted from the icons library (click INSERT tab, then ICONS button).