Ravindra BagaleCourses & study guides मराठी Track your progress

10. Parameters in Power Query (and Other Kinds of Parameters)

10.1 What Is a Parameter and Why Use It?

Start with a problem

Ravindra's folder path is different on his home PC and the training centre PC. Every query breaks when he changes PCs.

Explain simply

A parameter is a named value (like FolderPath) used in queries. Change it once, and all queries use the new value.

Show the data

PC FolderPath value
Home C:\PBI\folder_orders
Training centre D:\Class\folder_orders

About this data: This table uses columns: PC, FolderPath value. This table uses columns: FolderPath, Rows, Total. This table uses columns: Parameter, Type, Example value, Used in. This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).

Fictional sample data. Practice file: folder_orders/Orders_2026_04.csv, folder_orders/Orders_2026_05.csv (source: src/practice/).

Demonstrate

  1. Home › Transform data › Manage Parameters › New.
  2. Name FolderPath, Type Text, Current value C:\PBI\folder_orders.
  3. Open the folder query's Source step.
  4. Replace the hard-coded path with FolderPath.
  5. Change the parameter value and refresh.

Show the result

Your result should look like this (fictional sample):

FolderPath Rows Total
Home path 8 ₹2,100
Training path 8 ₹2,100

Explain what happened

The Source step reads the parameter, so the same query works on both PCs.

Explore further

  • Parameters also drive Dev/Prod servers and incremental refresh.

Detailed reference for this lesson:

A Power Query parameter is a named, typed value that queries use instead of hard-coded text. Examples in our project:

Parameter Type Example value Used in
FolderPath Text C:\QuickCommerce\Blinkit\ Folder connector (Module 7.20, 9)
ServerName Text (list) QCTEST01 / QCSERVER01 Sql.Database(ServerName, DatabaseName)
DatabaseName Text QuickCommerceDB SQL connection
StartDate Date 01-01-2025 Filter orders from this date
SelectedCity Text (list) Pune, Mumbai, Nashik, Sambhaji Nagar, Kolhapur, Nagpur A city-specific extract
RangeStart / RangeEnd Date/Time set by the Service Incremental refresh (10.8)

Simple bhashet sangaycha tar, benefits: one place to change a value, easy Dev/Test/Prod switching, reusable templates, and it is required for incremental refresh.

Ravindra Bagale's Tip

Friends, many students create parameters but never use them in the query, so changing the value does nothing. After creating a parameter, open the source step and replace the hard-coded text with the parameter name. Then change the value once to prove it works. Keep this in mind!

Fix common mistakes

Wrong result Reason Correction
Path not found Missing trailing folder or typo Copy the path from File Explorer
Parameter not used Source still hard-coded Edit the Source formula
Type mismatch Parameter type Any Use Text

Practise independently

Practice task

Where do you change the path when moving PCs?

Hints
  • One place.
Solution

Only the FolderPath parameter value.

Think like a professional

Parameters make reports portable and deployable – a good interview point.

Ravi Sir's Cards for this lesson

मराठी cards