Dynamic SQL queries with Power Query (Can be used for Excel and Power BI) - WHERE Conditions

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • Dynamic WHERE conditions for your SQL queries with Power Query (Can be used for Excel and Power BI)
    Files can be found here: powergi.net/re... Follow me on social media:
    Twitter: / gracielapowergi
    Linkedin: / maria-graciela-martine...

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

  • @shreevatsarao8177
    @shreevatsarao8177 Год назад +4

    The explanation was too fast and also plz memtion option before clicking then we can see and learn

  • @rubengao1508
    @rubengao1508 4 года назад +4

    I've been looking for a solution for updating SQL statement without having to manually update the script itself! This is seriously, freaking AWESOME!
    Thank you! 🙏👍

    • @PowerGI
      @PowerGI  4 года назад +1

      Hi Ruben, thanks so much for your comment, really made the day!! So glad the content was of help for you!

    • @rubengao1508
      @rubengao1508 4 года назад

      @@PowerGI I've tried using three parameters and noticed that the speed of update depends on the order in which the parameter appeared in the script. Interesting!

  • @gritz4lunch
    @gritz4lunch 3 года назад +1

    Cant thank you enpugh :)

  • @lfpinzonb
    @lfpinzonb 3 года назад +2

    An easy and powerful method to use dynamics parameters! Congrats!

    • @PowerGI
      @PowerGI  3 года назад

      Thanks so much for your kind words and for taking the time to leave a comment! So glad it was useful for you :)

  • @francinepowell9296
    @francinepowell9296 2 года назад +2

    Video is very poor quality!

  • @MSOfficeQuickTips
    @MSOfficeQuickTips 3 года назад +1

    THANK YOU!! I've been trying to figure this out for a while and this new skill will come in VERY handy!

    • @PowerGI
      @PowerGI  3 года назад

      hi Kyle! Thanks so much for your comment, glad to know it was useful for you, really made the day!

  • @humayunkabir-j5v
    @humayunkabir-j5v 4 месяца назад

    very nice! I will needing this to implement in one of my PBI report

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

    This not work more, now return this erro:
    [Unable to combine data] Section1/[Query]/[Last step of the query] references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
    Use this solution for workaround:
    community.powerbi.com/t5/Desktop/unable-to-combine-data-Please-rebuild-this-data-combination/m-p/832442#M399822

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

    Thank you so much for this video, one of the most useful tiips I have seen yet for POWRBI. Subbed!

  • @raymondjurado9203
    @raymondjurado9203 4 года назад

    Have you utilized Text.Combine to create multiple NOT conditions through the same concatenation of the custom column? How is the performance?

  • @mariaelenadiazvelasquez3080
    @mariaelenadiazvelasquez3080 4 года назад +1

    Thank you!

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

    What a powerful and simple solution you 've given us!!. I used this in order to get a dynamic WHERE statement based on the values of an Excel column that a used as source together with a MySQL DB in a PBI Dashboard. Thx a lot!!

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

    A perfect Solution 4 my query's!
    U r GREAT!

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

    Thank you so much for this. I was struggling with the privacy error for hours.

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

    Outstanding, very helpful. Thank you. I made some modifications to create a dynamic " IN " clause with comma separators. I even created multiple lists of parameters or even single parameters. It works wonders. Now all the accountants in my company are asking me for the same powerquery tools to perform recurrent checks. That will save them a lot of precious time.

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

    Im getting error we cannot apply operator & to types text and Table

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

    Great stuff... just what I was looking for...
    Awesome

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

    Thank you very much! Amazing lesson!

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

    Thank you, this is a great skill to have.

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

    Like a god. Thanks for this solution.

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

    This is fantastic. Really is. Nice one!

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

    Thanks for the tip! Loved the video, straight to the point!

  • @mkovcin
    @mkovcin 3 года назад

    ЊХ WHERE -- поздрав

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

    Very informative video!
    Will this work for an Oracle Database as well?

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

      Hi Asger! Yep, this approach also works for Oracle DB's. Used it so many times with that type of DB as well :)
      You would just need to select the Oracle Database connector instead :)

  • @ccarduz74
    @ccarduz74 3 года назад

    Graciela, thank you very much for your help. I've been looking for this solution for quite some time.

    • @PowerGI
      @PowerGI  3 года назад

      THank you Cesar for your comment!!!!

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

    Thanks for the information, When I use this way of creating parameters it doesn't work in any other system when I send the file to users. Could you please help me with how to fix this issue? they get error of build new data connection

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

      hi there! you need to replicate the steps at 3:41 in user's PC for this to work on their computer.

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

      the other option is merging all the code into one single query

  • @lisanordling3795
    @lisanordling3795 3 года назад

    Is it possible to have the WHERE clause after the GROUP BY, or can you insert the variable in-between the FROM and the GROUP BY? Any help appreciated!

    • @PowerGI
      @PowerGI  3 года назад

      Hi Lisa! Thx for your comment. You can concatenate the "group by" at the end "your ql statement "&filter&" group by column1,column2,.."
      You can send me an email to graciela@powergi.net if additional help is needed :)

    • @lisanordling3795
      @lisanordling3795 3 года назад

      @@PowerGI Thanks, such a simple solution. This is extremely helpful, appreciate you putting out this video and quick replies to comments.

  • @swativish
    @swativish 4 года назад

    Hi does this work when we do schedule refresh for Power Bi. I am unable to refresh this on the service

    • @PowerGI
      @PowerGI  4 года назад

      hello! which error are you getting?

  • @niklkit5624
    @niklkit5624 3 года назад

    Very nice voice... )

  • @JG-xy8qw
    @JG-xy8qw 4 года назад

    Is there a way to join these two tables at server end instead of using WHERE?

    • @PowerGI
      @PowerGI  4 года назад

      hello! do you have an example on how you would do it with regular SQL?

  • @amar1190
    @amar1190 3 года назад

    I've watched this viedo multiple times today and understand it better each time. My situation is different where I want to use the values inputted from the user and load this to SQL as a lookup. Is this possible from excel (trying to avoid the import wizard). Either way great video :)

    • @PowerGI
      @PowerGI  3 года назад

      Hello! Thanks for your comment. What do you mean by " load this to SQL as a lookup. "? (Specially the part of "as a lookup") you can insert records from Excel to SQl using a similar approach to what's shown in the video. Let me know more details to see if I can help :)

    • @amar1190
      @amar1190 3 года назад

      @@PowerGI Thanks for your super quick reply! The end user will update two columns, for example column A is a box, and column B has all the products in the box. I want to know if it is possible to load these columns from excel on to the server where I am carrying out my SQL queries. Or if I can join to these columns somehow?

    • @PowerGI
      @PowerGI  3 года назад

      @@amar1190 can you email me to graciela@powergi.net with an example file ?

  • @chrise7855
    @chrise7855 3 года назад

    Thank you so much! This video was essential for me to find out how to do this. You’re brilliant!

    • @PowerGI
      @PowerGI  3 года назад

      Thanks so much for your comment! Really appreciate it, so glad it was helpful!