Power Query: Riveting Results Part 2
22 December 2021
Welcome to our Power Query blog. This week, I create parameters for last week’s example.
My salespeople are still taking a break. We will keep looking at those exam results from last week:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image1.png/e774d10cbbb9450fc45efbe51abdf434.jpg)
I will be grading the results, and I will be using this example to explore parameters. Last time, I created a column to grade the results:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image2.png/f32e5a15e2cf9c3e4d2d058458ce054d.jpg)
I am now ready to create some parameters to calculate the grades. To begin with, I will enter these parameters from the ‘Manage Parameter’ option on the Home tab:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image3.png/f1140ff857fc3b6f5f97a6a24f4a6fc7.jpg)
I opt to create a ‘New Parameter’. This brings up a dialog:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image4.png/72aa864d2854c6fefb1083fba0ab5792.jpg)
I am going to enter a parameter for each grade. I call my first parameter P_Grade_9:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image5.png/36776d1da4d05b45bb5a5d09375f407c.jpg)
The ‘P_’ is to indicate it is a parameter. This will make it easy to spot in the list of queries. I also enter a description. When I choose the Type, there is no option for percentage, so I make it a ‘Decimal Number’ instead.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image6.png/23912d3b1671861e02bebcd5183f1607.jpg)
For now, I will allow ‘Any value’. I will be revisiting the ‘Suggested Values’ dropdown for this example later.
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image7.png/6f49c288a0d88a66b427eaf4ece923d6.jpg)
To complete this parameter, I enter a ‘Current Value’ of 90. If I were to click ‘OK’ at this point, the parameter would be created, and I would automatically exit the dialog:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image8.png/b9ee28d90e6b5bc92ea4aeafdad51628.jpg)
I can see the parameter in the Queries panel. If the parameter is selected, then I can edit the ‘Current Value’ if I wish. The ‘Current Value’ also appears next to the parameter in brackets ‘(90)’ so that I can always see what it is set to in the Queries panel.
If I want to create multiple parameters, then I can stay in the ‘Manage Parameter’ dialog by clicking ‘New’ instead of ‘OK’ when I have finished each parameter:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image9.png/0485ccbc83bdeec1d741bad442a1ea5f.jpg)
Note that since my parameters are similar, I can also copy and paste or create Duplicates:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image10.png/daf8c4f0259ce428269c0d3d4badd32b.jpg)
This is fine, as long as I remember to change the name, description and ‘Current Value’.
Do not create a ‘Reference’. This would return the ‘Current Value’ of the parameter:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image11.png/22c6daeb82d7d69ac88f878227e04b28.jpg)
The icon next to P_Grade_8 (2) indicates a number. Note also that the ‘(2)’ in this case is created because there is already a P_Grade_8 and is not the value!
I now have all my parameters ready for the next step:
![](http://sumproduct-4634.kxcdn.com/img/containers/main/blog-pictures/2021/power-query/264/image12.png/a1537847463e660a31158c8032525438.jpg)
Come back next time for more ways to use Power Query!