Ravindra BagaleCourses & study guides

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

10.2 Creating a Parameter (Manage Parameters Dialog)

Steps in Power BI

  1. Open the Power Query Editor › Home › Manage Parameters › New Parameter.
  2. Fill in the fields:
    • Name: ServerName (no spaces makes M code easier).
    • Description: "SQL Server for quick-commerce data" (shown as a tooltip).
    • Required: ticked (the value cannot be empty).
    • Type: Any, Text, Decimal Number, Date/Time, Date, Time, Date/Time/Timezone, Duration, True/False, Binary.
    • Suggested Values: Any value, List of values (type allowed values, e.g. QCTEST01, QCSERVER01), or Query (a list query supplies the values).
    • Default Value (for lists) and Current Value.
  3. Click OK. The parameter appears in the Queries pane with a special icon and shows its current value.
  4. To change it later: select it in the Queries pane and edit Current Value, or in Report view use Home › Transform data › Edit parameters.

Parameter from a query

Create a list query, for example a blank query = {"Pune","Solapur","Nashik","Sambhaji Nagar","Kolhapur","Nagpur"}, or right-click a column › Drill Down to turn DarkStore[City] into a list. Choose Suggested Values › Query and pick it. The drop-down then nehmi matches your data.

Aata pudhe jaauya – ha parameter pratyakshat kuthe vaparaycha te baghu.

Ravindra Bagale's Tip

Ek common chuk mhanje choosing the wrong parameter type, udaharan mhanje Text for a date limit. Pick the type that matches how it will be used (Date/Time for RangeStart, Text for a server name) and add Suggested values from a list when only a few values are valid. He exam aani interview doghansathi important aahe.