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...
The explanation was too fast and also plz memtion option before clicking then we can see and learn
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! 🙏👍
Hi Ruben, thanks so much for your comment, really made the day!! So glad the content was of help for you!
@@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!
Cant thank you enpugh :)
An easy and powerful method to use dynamics parameters! Congrats!
Thanks so much for your kind words and for taking the time to leave a comment! So glad it was useful for you :)
Video is very poor quality!
THANK YOU!! I've been trying to figure this out for a while and this new skill will come in VERY handy!
hi Kyle! Thanks so much for your comment, glad to know it was useful for you, really made the day!
very nice! I will needing this to implement in one of my PBI report
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
Thank you so much for this video, one of the most useful tiips I have seen yet for POWRBI. Subbed!
Have you utilized Text.Combine to create multiple NOT conditions through the same concatenation of the custom column? How is the performance?
Thank you!
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!!
A perfect Solution 4 my query's!
U r GREAT!
Thank you so much for this. I was struggling with the privacy error for hours.
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.
Im getting error we cannot apply operator & to types text and Table
Great stuff... just what I was looking for...
Awesome
Thank you very much! Amazing lesson!
Thank you, this is a great skill to have.
Like a god. Thanks for this solution.
This is fantastic. Really is. Nice one!
Thanks for the tip! Loved the video, straight to the point!
ЊХ WHERE -- поздрав
Very informative video!
Will this work for an Oracle Database as well?
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 :)
Graciela, thank you very much for your help. I've been looking for this solution for quite some time.
THank you Cesar for your comment!!!!
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
hi there! you need to replicate the steps at 3:41 in user's PC for this to work on their computer.
the other option is merging all the code into one single query
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!
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 :)
@@PowerGI Thanks, such a simple solution. This is extremely helpful, appreciate you putting out this video and quick replies to comments.
Hi does this work when we do schedule refresh for Power Bi. I am unable to refresh this on the service
hello! which error are you getting?
Very nice voice... )
Is there a way to join these two tables at server end instead of using WHERE?
hello! do you have an example on how you would do it with regular SQL?
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 :)
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 :)
@@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?
@@amar1190 can you email me to graciela@powergi.net with an example file ?
Thank you so much! This video was essential for me to find out how to do this. You’re brilliant!
Thanks so much for your comment! Really appreciate it, so glad it was helpful!