October Sale - 20% of all courses - Book Today

Query parameters

Using parameters in Power Query

September 13, 2017

Power BI and Power Query

In this article we will show you how to use parameters within Power Query in PowerBI. Query parameters are a powerful way to dynamically interact with your data in Power BI. With the query parameters, users can define one or multiple parameters to be used in their queries. Stay tuned while we work through this exercise to demonstrate how query parameters work.

Consider a query with geographical information in it like Country, State, and City:

As you can see the query contains information on state and city names from a few countries across the globe. We would like to just focus on Europe and hence we would create a parameter to define a list of all the countries in Europe. We have already created a list query called Europe which we will use when we create the parameter.

Under the Home menu click on Manage Parameters to bring up the Parameters window:

excel exert

Enter the data in the relevant sections like below and hit OK.

excel exert

A new parameter EuropeanCountries is now created which we can now use to filter the query. Click on the Filter option in the Countries column and go to Text Filters-> equals… to bring up the Filter Rows window. Select Parameter instead of Text to choose the EuropeanCoutries parameter and hit OK.

excel exert

Since we set the current value of the parameter to be Germany the query now lists only data from Germany

excel exert

You can now dynamically update your charts by changing the current value. In the data model go to Home-> Edit Queries-> Edit Parameters to bring up the Enter Parameters window. From the drop down list choose the country you want and the query and any chart/table which references the Country field will be updated

excel exert

This is just one example of how you can use parameters.

View Power BI Courses

Contact Us

What is Remote Training?

Valued by Individuals

Over 23623 Reviews
Very good course - I learnt a lot. Tamara was really patient and helpful. -R Intermediate Brisbane
Elly - R Intermediate, .
Learnt lots good stuff to use for my work. Thank you -Excel Beginner Brisbane
Adam - Excel Beginner, .
Thank you for your time and it was very informative. Many Thanks -Excel Beginner Brisbane
Morgan - Excel Beginner, .
it covered all my needs. Thanks -Excel Beginner Brisbane
Rohan - Excel Beginner, .
Great learning and enjoyed . -Excel Beginner Brisbane
John - Excel Beginner, .
Very pleasant, informative day. -Power BI Beginner Brisbane
Bobbette - Power BI Beginner, .
This has been a very helpful introduction to Power BI - we'll be able to move some of our reports across to Power BI sooner than we expected. -Power BI Beginner Brisbane
Karen - Power BI Beginner, .
Great beginner session - trainer very personable. -Power BI Beginner Brisbane
Tracey - Power BI Beginner, .
Very helpful and hands on. A comprehensive look at the basics of PowerBI - definitely interested in learning more in the intermediate course. -Power BI Beginner Brisbane
Daniel - Power BI Beginner, .
Very valuable session. Can definitely see how we will use this in the workplace. Steven was a great trainer and kept the room going all day, -Power BI Beginner Brisbane
Amanda - Power BI Beginner, .
Steven was a great trainer. -Power BI Beginner Brisbane
Fay - Power BI Beginner, .
Great overview. -Power BI Beginner Brisbane
Barbara - Power BI Beginner, .
Very informative, the presenter was thorough and welcoming to all. I never felt uncomfortable asking questions. I am also grateful for the Course Manual, so I can review the Agenda topics again at my own pace. -Excel Intermediate Sydney
Janelle - Excel Intermediate, .
excellent teacher very impressed -Excel Intermediate Remote Online
Michelle - Excel Intermediate, .
Very informative. Some great hacks -Excel Intermediate Remote Online
Matthew - Excel Intermediate, .
Thanks Michael, you were patient and happy to go back over knowledge whenever people needed it. I love how excited you got over some of the technical aspects - they were really interesting! Sometimes it was a little hard to hear, might have been connectivity issues on my end, not sure. Thanks so much! -Excel Intermediate Sydney
Kristie - Excel Intermediate, .
The topics chosen were very useful. I especially think the If statements, vlook up, pivot table and flash fill will work well for me in the future. Michael was very helpful and always stopped to assist those who needed further info. He was also happy to answers questions in general related to excel. Potentially needed some polls or questions within the training to check learning and understanding. -Excel Intermediate Sydney
Jessica - Excel Intermediate, .
Michael is very good teacher. It was a great session and learned a lot in a short time. -Excel Intermediate Sydney
Philip - Excel Intermediate, .
very good. Need to practice now -Excel Intermediate Sydney
David - Excel Intermediate, .
Jason gave us a really good overview of both Power BI service and desktop and was very helpful answering our questions. The course was very helpful in cementing and extending my basic understanding of Power BI -Power BI Beginner Canberra
Paul - Power BI Beginner, .

Trusted by Business

south east asia microsoft training courses nexacu

Follow us