What are some basic ways to understand and use Parameters?

Monsignor

Board Regular
Joined
May 30, 2011
Messages
162
I've been poking around, trying to understand Parameters and here's what I found.
1. Someone used parameters to create a function that involved an API. There was too much going on to understand the parameter piece by itself.
2. Another example used parameters in a way that seemed like a filter or even a slicer would have been easier.
3. Connecting to a database that requires a password. Again, too much stuff going on to understand the parameters piece.

It seems that parameters are used for specifying they type of data to retrieve. A raw data dump might be way too much. But if a person could restrict the data to, for example, houses with 3 or more bathrooms, imported results might be reduced from 1000 down to 90.

Maybe this gets tricky regarding the data source?
99% of the time I'm retrieving data into Power Query from a worksheet, a work book or a folder. Never an API or database. Sometimes a web page.

Am I understanding this properly?
Are there resources that explain this in a simple way?
What are ways of thinking about a parameter being desirable?
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
below video may help you
1349 Excel Magic Trick 1349_ Power Query with Input Variables from Excel Sheet to Extract Records.mp4
 
Upvote 0
Thanks for that. I'm specifically wondering about Parameters in the Power Query ribbon in the Home tab.
 
Upvote 0
The real advantage of query parameters is in the context of creating functions in Power Query:
Typically it is not possible to step through the code steps inside a Power Query function as you can in a regular query.
For that reason, a mechanism is available to create an example query and use this example to create a function.
Any adjustments in the example query will be automatically promoted to the function.
Now the added value of parameters in this context is that the example query uses this parameter and the function uses a parameter with exactly the same name.
This allows the example query code to be copied into the body of the function, without any modification.
So any adjustments in the example query will be automatically promoted to the related function.

This video illustrates this mechanism with an example query that multiplies a parameter value by 10.
This query is turned into a function and used in the main query to multiply all values in a column by 10.
Then the example query is adjusted (*10 + 10) and this adjustment is automatically promoted to the function and therefor to the main query as well.
 
Upvote 0

Forum statistics

Threads
1,225,730
Messages
6,186,698
Members
453,369
Latest member
positivemind

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top