All courses REMOTE until June 30 | Limited in-class sessions in June - Call Us | From July 1 all courses available in-class and remotely

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

What is Remote Training?

Valued by Individuals

 

4.8/5
Over 20822 Reviews
Great Explanations, Very Helpful, Highly recommend. -Excel Intermediate Perth
Luke - Excel Intermediate, .
Jagg was really great, good amount of detail and a good pace, made it easy to keep up and really learn everything. Thank you -Excel Intermediate Sydney
Madelene - Excel Intermediate, .
Great communication skills -Excel Intermediate Perth
Anthony - Excel Intermediate, .
. -Office365 Intermediate Sydney
James - Office365 Intermediate, .
Helpful and well explained -Office365 Intermediate Sydney
Monika - Office365 Intermediate, .
John was really good at power BI and some of the concepts were great. I will keep all these details close by and even reach out to John if I have further questions. Thanks for the day! -Power BI Advanced Canberra
Matthew - Power BI Advanced, .
Thanks -Power BI Advanced Canberra
Gabriela - Power BI Advanced, .
The training was really great. Jag kept us engaged for the whole day which is great. I learnt a lot and can't wait o put the tips and tricks in action. Thanks -Excel Intermediate Sydney
Rosalind - Excel Intermediate, .
Jag is so very good! Was very engaging and actually very fun! -Excel Intermediate Sydney
Michelle - Excel Intermediate, .
Good overall -Power BI Advanced Canberra
YuinAi - Power BI Advanced, .
Michael was great - he had a good pace and checked in with us to see if we had any questions. He is clearly very passionate about Power BI which enhanced the whole experience -Power BI Beginner Sydney
Ally - Power BI Beginner, .
It was very informative and Michael was very helpful and detailed. -Power BI Beginner Sydney
Alan - Power BI Beginner, .
Very good introduction to PowerBI. Concepts very well explained. -Power BI Beginner Sydney
Eric - Power BI Beginner, .
Thanks Ken, very informative. -PowerPoint Level 2 Sydney
David - PowerPoint Level 2, .
Thank you was a great session. -PowerPoint Level 2 Sydney
Nikita - PowerPoint Level 2, .
Really useful tips and shortcuts -PowerPoint Level 2 Sydney
Devlin - PowerPoint Level 2, .
Thanks- great course! -PowerPoint Level 2 Sydney
Gabrielle - PowerPoint Level 2, .
Helpful. Thank you very much. -PowerPoint Level 2 Sydney
Guida - PowerPoint Level 2, .
Wonderful course. Enjoyed it very much and learnt many new features -Power BI Beginner Sydney
Victor - Power BI Beginner, .
. -Power BI Beginner Sydney
Steve - Power BI Beginner, .

Trusted by Business

Procured by Government

Map of Australia