Power Query parameters | Add flexibility to your queries | Excel Off The Grid

Power Query parameters | Add flexibility to your queries | Excel Off The Grid

Excel Off The Grid

2 года назад

57,996 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@database_tips_tricks
@database_tips_tricks - 29.09.2022 17:23

Brilliant

Ответить
@Koniogdy
@Koniogdy - 29.09.2022 20:45

Another precious brick in my PQ wall :)
Thanx Mark!

Ответить
@zaighamuddinfarooqui1705
@zaighamuddinfarooqui1705 - 30.09.2022 17:20

Excellent. Making life more easier. Thanks Mark. 👍👍💕💕

Ответить
@rm8168
@rm8168 - 30.09.2022 17:31

Thank you for providing another great insight into power Query. I have 1000s of product skus and I only need to eliminate a couple dozen dynamically. Do you see a way to easily use a Power Query Parameter for accomplishing this?

Ответить
@wayneedmondson1065
@wayneedmondson1065 - 30.09.2022 23:42

Thanks Mark! Great tips. Thumbs up!!

Ответить
@akask6458
@akask6458 - 01.10.2022 02:15

Thank you - great explanation

Ответить
@iankr
@iankr - 01.10.2022 10:25

Many thanks for the clear explanation, Mark.

Ответить
@munim777
@munim777 - 05.10.2022 20:42

Thank you for a great explanation. Can you please make a video to cover the firewall error? They are annoying!

Ответить
@Milhouse77BS
@Milhouse77BS - 08.10.2022 00:42

Besides Incremental Refresh, parameters can be changed in the Scheduled Refresh for a dataset. So you could change the parameter in the service after it is published from Desktop.

Ответить
@MrBeadies
@MrBeadies - 28.10.2022 00:43

Why would you not just use slicers?

Ответить
@Jahspecs1
@Jahspecs1 - 06.12.2022 08:28

Excellent…. What about passing the Excel value to a SQL so you can limit the data table import into power query from the sql database?

Ответить
@versigliact
@versigliact - 11.02.2023 10:55

How to between a date?

Ответить
@aneeza6259
@aneeza6259 - 19.02.2023 18:41

Great

Ответить
@shirsN
@shirsN - 07.04.2023 22:05

Nice video. I rarely use parameters from inside PQ. I always use it directly from excel, the way you showed for most of the part. I wonder why the most efficient way is referred as unofficial n the inefficient way as official by ms😅

Ответить
@sinmaan7568
@sinmaan7568 - 20.05.2023 19:43

Very nice. If we were to use a cell parameter to filter for text strings how would you do it? For example, we need to often filter by corporation names and we can't use the complete name we look for due to the variarions in the databases (ex: microsoft, microsoft inc, microsoft ltd, etc).

Ответить
@txreal2
@txreal2 - 24.05.2023 05:58

So how do you load multiple ranges on different sheets in a workbook without first having to convert each of them into a table and load them individually? Thanks

Ответить
@jamesdickens1394
@jamesdickens1394 - 31.05.2023 17:46

Thank you so much for this video. This helped me crack the code to a problem I have had for a while and couldn't resolve. With a couple of extra steps I can now select data as you show in the video but I have set it up to allow me to edit that value and update the table with the new value so when next I pull up data for say "John" the value I put in as a new amount now shows up in "John's table. Not sure if I'm making sense with this but this really helps me out on being able store and update values without using VBA to do it.

Ответить
@serdip
@serdip - 22.06.2023 18:20

Brilliant video! Thank you so much for explaining both techniques for creating and using parameters to make queries return dynamic results based on the value(s) of the parameters(s) it is constructed to work with.

I encountered the dreaded formula firewall error in which PQ complains about the data source of the parameter being different than the data source of the query, or something like that. From my research on the web, one solution is to select the "Always Ignore Privacy Level" option in the Query Options dialog under both the GLOBAL and CURRENT WORKBOOK sections within Power Query (File->Options and settings->Query Options). I imagine as long as the data sources are local to the user's computer, selecting this option poses no serious security risks.

Thanks again for producing a very helpful and clearly explained presentation on this important topic.

Ответить
@serdip
@serdip - 22.06.2023 18:37

Great video with lots of very useful and practical information that makes Power Query even more powerful and dynamic.

I noticed in this and similar videos that the scenario for implementing worksheet cells as parameters typically involves filtering a table. While this is certainly valid and makes for an easily understandable introduction to the concepts, it seems that the AutoFilter dropdowns offer the same functionality. If so, would a user typically implement parameters in this fashion?

To understand and put into practice the concepts taught in the video, I tried to do something slightly different. I created three identical tables with data from each of three different divisions of a fictitious company. I created a table called "Select_Source" with a dropdown populated with three values: "Division_1", "Division_2", "Division_3".

Next, I loaded the Select_Source table into Power Query and drilled down to its current value, which is "Division_1". I then modified the existing query for a previously uploaded table (Division_1) to reference the newly created Select_Source parameter, so that the data loaded from the query back into an Excel table named "PT_Data" would change depending on the value selected.

Now I can change the source of data for my pivot table by selecting an item from the Select_Source dropdown and clicking Refresh All on the Data tab, which is easier, I believe, than clicking the Change Data Source button on the Pivot Table Analyze tab. I found that I had to turn off Enable Background Refresh on the PT_Data query, otherwise it would be necessary to click Refresh All twice in order to update PT_Data and update the pivot table for which PT_Data is the data source.

Thank you kindly.

Ответить
@alphonsuseze5108
@alphonsuseze5108 - 23.06.2023 11:16

Hello Boss, Thanks for the great video. I have a few questions/challenges!
I have situation where the records are about 1.8M records. I'm not able to load all into excel table first before adding it to the power query.
Secondly, How can I use Query to create the parameters and as well make the parameters searchable dropdown?

Ответить
@satay2hot
@satay2hot - 13.07.2023 09:42

Nice! you explained clearly parameters that in the excel worksheet vs parameters in PQ. I do understand now why all query and parameter should not be only kept in PQ rather than cells in excel. For me, this is especially useful of migrating all the m codes with parameters rather than has to take keep the parameter in a spreadsheet cell as this make the spreadsheet clunky. The role of spreadsheet should only keep the data tables

Ответить
@capstonepm111
@capstonepm111 - 14.07.2023 06:51

Thanks for the video.
Can you please guide scenario where datasource is Outlook in which I receive daily email with similar set of data against certain set of locations for each day. How can we use "Official Parameters" to selecte StartDate and EnDate so power query returns data for selected period only? Would appreciate if you can guide on this scenario or if poasible make a video on this.

Ответить
@Karenshow
@Karenshow - 21.07.2023 15:40

Could you do the same on Power BI?

Ответить
@StopWhining491
@StopWhining491 - 23.07.2023 16:32

Sort of like Slicers?

Ответить
@McIlravyInc
@McIlravyInc - 02.08.2023 05:50

I use named cells in worksheets to do this, but have a lot of issues with connection only queries not updating with refresh all. Does using a table work better than a named cell? Would having the parameter in PQ read the connection only query aolve this (even though it would be redundant.)
It seems to be more of an issue because I save the file with the named cells empty but not sure how to work around that.

Ответить
@simonsmith5350
@simonsmith5350 - 04.08.2023 07:04

worked a treat. Wondering if I want to see all the data (ie no filter) how to do that without going back to power query editor? Thanks again

Ответить
@dbknox
@dbknox - 16.08.2023 18:48

Great video! I am attempting to pull in a table from a webpage for a common stock, and the URL of the source changes given the ticker symbol (by the user) for the stock – so my variable is in the source statement, not in the filtered steps like in your query. Is there a way to use a variable parameter in a web source?

Ответить
@emilmubarakshin49
@emilmubarakshin49 - 25.08.2023 05:16

Literally did it today. Thanks!

Ответить
@MizanurRahman-ln8uo
@MizanurRahman-ln8uo - 20.10.2023 09:03

Great video!

Ответить
@SteinarBleken
@SteinarBleken - 30.10.2023 19:07

I find many PQ tutorial on using ONE parameter. What i miss is a tutorial who uses a table with two or more columns and two or more rows as parameters and delivers one table.

Ответить
@excel_ladz
@excel_ladz - 15.12.2023 06:38

Thank you for this video! I'm using Excel on Mac, and unfortunately I'm getting "An on-premises data gateway is required to connect." error in the Power Query Editor. Is there a way to fix this?

Ответить
@hazemali382
@hazemali382 - 07.01.2024 16:46

more than great

Ответить
@nataliaartimenia8384
@nataliaartimenia8384 - 26.01.2024 02:23

thank you so much, you've helped me a great deal with my parameter settings!

Ответить
@mightydrew1970
@mightydrew1970 - 02.02.2024 03:30

Much easier than my current method of using an Excel.CurrentWorkbook() call, in the Advanced editor: (example, get the value from the range named "rngDatabase")

dbName = Excel.CurrentWorkbook(){[Name="rngDatabase"]}[Content]{0}[Column1]

Ответить
@JDAnderson-c1l
@JDAnderson-c1l - 29.02.2024 22:40

I like this solution but I need to compute the values I put in those parameter tables. When normal spreadsheet recalculation occurs, I see the correct numbers in my parameter tables. With or without clicking on the refresh button, the queries do not pick up on the calculated values. It works just the way you show if I enter a value in by hand. Do you know something other than the refresh button that will cause my parameter queries to read the computed cell values?

Ответить
@bobmoro
@bobmoro - 26.04.2024 18:19

Hi, this guide Is great but i have this problem to add this functionality: the query that i have Is an SQL native query to my SQL server...and i would like to add the possibilty to enter the parameter from the table added in excel...but how i can reference to this value in SQL native code (that i can modify in advanced Power query editor)?

Ответить
@dandysixties
@dandysixties - 16.05.2024 16:54

awesome. very useful

Ответить
@KrishnaKumar-zn9kg
@KrishnaKumar-zn9kg - 16.05.2024 17:28

Good one. Thanks.

Ответить
@ankitsaxena5966
@ankitsaxena5966 - 27.05.2024 20:01

That's so cool

Ответить
@gonzuic
@gonzuic - 26.09.2024 23:57

Thanks Mark.
You said, Power Query parameters can help with “incremental refresh”, do you have some examples about that?

Gracias.

Ответить