Excel Power Query Parameters: How They Work

How-to basics · Updated November 21, 2026

Excel Power Query parameters are named values that you can change to control parts of a query, such as a date filter, folder path, or category. In Excel for Microsoft 365 on Windows, create or edit one in Power Query Editor through Home > Manage Parameters, then refer to its name in the query that needs it.

What a Power Query parameter is

A parameter is a reusable input value in Power Query. Instead of typing the same date, number, or text value directly into a query step, you give the value a name and use that name wherever the query needs it. Changing the parameter’s current value can then change the result the query produces when it is evaluated or refreshed.

For example, a sales query might contain a date filter. If the cutoff is hard-coded as a particular date, changing the reporting period means editing the filter itself. If the filter refers to a parameter named StartDate, you can change the parameter value and leave the transformation steps intact.

Parameters are part of Power Query’s query-editing environment; they are not worksheet formulas, Excel cell references, or prompts that automatically appear whenever someone refreshes a workbook. They are especially useful when a query needs a value that may change but should remain separate from the query’s transformation logic.

How parameters work in a query

Power Query uses the M language to describe how it obtains and transforms data. A parameter has a name and a data type, and the query can refer to the name as an M value. Power Query evaluates that reference using the parameter’s current value. The parameter can affect a filter, a source location, a function argument, or another expression in the query.

For example, suppose a query already has a step named Source, the source table contains a date column named OrderDate, and StartDate is a date-type parameter. A filter step can be written as:

= Table.SelectRows(Source, each [OrderDate] >= StartDate)

This keeps rows whose order date is on or after the parameter value. The query must use a compatible type: comparing a date column with a text parameter can cause an error or an unintended result. Set the parameter to the appropriate type and check that the source column has the expected type as well.

A parameter can also contribute to a source path. For instance, a text parameter named FolderPath can be used when constructing a file location. The rest of the query can then transform the file’s contents. A changed path does not make the file available by itself: the location must exist, the account must have access, and the connector must support the source expression.

Create or edit a parameter in Excel

Open the Power Query Editor in Excel for Microsoft 365 on Windows. You can open an existing query from Data > Queries & Connections, then double-click the query. Alternatively, use Data > Get Data > Launch Power Query Editor if that command is available in your Excel build. In the editor, use these steps:

  1. Select Home > Manage Parameters > New Parameter.
  2. Enter a clear name, such as StartDate, and optionally add a description that explains its purpose.
  3. Choose a type that matches the value the query needs, such as Date, Whole Number, Decimal Number, or Text.
  4. Choose the suggested-values behavior. Depending on the selection, the value can be unrestricted, chosen from a list, or supplied from a query.
  5. Set the current value, then select OK.
  6. Edit the query that should use the parameter and reference its name in the relevant step or expression.
  7. Select Close & Load, or Close & Load To, to return the query results to Excel.

To change an existing parameter, return to Home > Manage Parameters, select it, and edit its settings. A descriptive name is more useful than a generic label such as Parameter1, particularly when a workbook has several queries or other people may maintain it.

Parameter types and suggested values

Choose the parameter type to match its job. Text is appropriate for a folder path, product code, or region name. Date suits a cutoff date, while Date/Time is appropriate when the time of day matters. Whole Number and Decimal Number cover numeric inputs; True/False is useful for a switch-like choice. Power Query also offers other types, including Time and Duration, depending on the editor and data source.

Suggested values help constrain what someone can select in the parameter settings. An unrestricted value is flexible, but it leaves more room for typos. A list of values can limit a parameter to known options such as “North,” “South,” and “West.” A query-based suggestion can draw options from a query that returns a list. These choices guide the parameter value; they do not automatically validate every unrelated value that a query might encounter.

Match the value to the source’s conventions. A folder parameter needs a usable path, including the appropriate separators. A text filter must match the source values as represented, including spelling and sometimes case behavior determined by the connector. A date parameter should be a date rather than text that merely looks like a date. Explicit, consistent types make queries easier to understand and help prevent conversion errors.

Useful examples and when to use them

Parameters are most helpful when a value is likely to change and you want to avoid rewriting transformation steps. Common uses include:

  • Reporting period: use a date parameter to filter transactions from a chosen start date or reporting period.
  • File or folder location: use a text parameter to point a query at a different input file or directory, such as a test folder instead of a production folder.
  • Category or region: use a text parameter to select one business segment when reviewing or loading a query result.
  • Numeric threshold: use a whole-number or decimal parameter to filter records above a selected quantity, score, or limit.
  • Reusable query logic: use a parameter as an input to a custom function or another query, so the same transformation can work with different values.

Consider a workbook that imports a monthly CSV file. A folder or file-name parameter can make it simpler to switch between a sample file and the current file. However, parameters do not make a query automatically discover new files, choose the newest file, or repair a changed column layout. Those behaviors require appropriate query logic in addition to the parameter.

Changing values, refreshing, and sharing

After changing a parameter’s current value, refresh the affected query so Excel evaluates it with the new input. Use Data > Refresh All to refresh workbook queries, or refresh an individual query from its available refresh controls. If the query depends on other queries, those dependencies may also need to be evaluated; Power Query manages query dependencies when it refreshes the result.

Do not assume that Excel will ask a user to enter a new parameter value at every refresh. In a normal workbook workflow, a parameter has a current value stored in its query settings. Someone who opens the workbook can inspect or edit the parameter in Power Query Editor, but that is different from a worksheet prompt or a form control.

Parameters are also not automatically linked to worksheet cells. If a worksheet cell contains a date, changing that cell alone does not necessarily change a Power Query parameter. A common alternative is to put the input in a small Excel table, load that table into Power Query, and have the main query read the value from the resulting query. That is a cell-driven query design, not an automatic parameter-to-cell connection, and it should be designed and tested with refresh behavior in mind.

When sharing a workbook, consider whether recipients can access the same files, databases, or folders. A parameter can change a source address, but it cannot provide credentials or grant access. Recipients may need to configure their own data-source permissions, and organizational privacy settings can affect queries that combine sources.

Limitations, privacy, and common problems

A parameter does not remove the usual requirements of a Power Query source. The source must be reachable at refresh time, credentials must be valid, and the query must be able to interpret the returned data. If a path parameter points to a local folder on one person’s computer, another person’s workbook may fail because that folder does not exist on their computer.

Queries that combine data sources can also encounter privacy-level or Formula.Firewall errors. These protections concern how Power Query combines and transfers information between sources; changing a parameter is not a substitute for reviewing the source settings or the query design. Follow your organization’s data policies rather than lowering privacy protections just to suppress an error.

Some connectors or hosting environments impose restrictions on dynamic data sources or particular query patterns. A source expression built from a parameter may work in desktop Excel but behave differently in another product or refresh environment. If a workbook is intended for a managed refresh service, verify that environment’s connector and refresh requirements rather than assuming desktop behavior will carry over.

When a parameter seems not to work, check these points before rebuilding the query:

  • Confirm that the query refers to the exact parameter name and that the parameter’s current value is the one you expect.
  • Check that the parameter type and the column or source argument type are compatible.
  • Verify the source path, date range, or selected value independently.
  • Refresh the query after changing the value, and look for errors in the applied steps.
  • Check credentials, privacy settings, and whether the source is available to the person refreshing the workbook.

Parameters compared with filters and worksheet inputs

A regular filter step narrows data according to a value embedded in the query’s steps. That can be perfectly adequate when the criterion rarely changes. A parameter separates a changeable input from those steps, which can make maintenance easier when the value changes repeatedly or needs to be reused in several places.

A worksheet input is more visible and convenient for people who do not use Power Query Editor, but it requires a query design that reads the cell’s value and handles its type correctly. A parameter is a Power Query setting; a worksheet input is workbook data. Choose based on who will change the value and how they will work. A report owner comfortable with the editor may prefer a parameter, while a workbook designed for routine end-user updates may need a clearly labeled input table or another controlled interface.

Power BI also has parameters, but features and refresh behavior can differ across Excel, Power BI Desktop, and hosted services. Instructions for one product should not be assumed to match another exactly. In Excel, follow the controls available in the Excel Power Query Editor and test the workbook in the environment where it will actually be refreshed.

Frequently Asked Questions

Do Excel Power Query parameters update automatically from a cell?
No. A parameter’s current value is managed in Power Query and is not automatically bound to a worksheet cell. To use a cell value, build a query that reads the cell or a named Excel table and use that query’s result in the transformation.

Will Excel ask me for a parameter value when I refresh?
Usually, no. A parameter has a current value, and refreshing uses that value. To change it, edit the parameter in Power Query Editor, or build a separate cell-driven input workflow if users need to provide values from the sheet.

Can I use a parameter to change a file path?
Yes, a text parameter can be used in query logic that constructs a file path. The new path still has to exist and be accessible, and the query may be subject to connector, credential, or privacy restrictions.

Why does my parameter produce a type error?
The parameter may not have the same type as the value it is compared with or passed to. For example, a text value that resembles a date is not necessarily a Date value. Check the parameter type, the source column type, and any conversion steps.

Can one parameter be used in multiple queries?
Yes. Queries can refer to the same parameter when they need the same input. This is useful for consistent filters, but changing that parameter may affect every dependent query, so check the workbook’s query dependencies before editing it.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.