Template parameters

  1. Open the Power BI Desktop file and click on New Parameter from the Manage Parameters dropdown in the Query Editor.
  2. Create a date type parameter with the name Start Date and a text parameter named Customer Country.
  3. Both parameters should be Required, and the Suggested Values property can be left at Any value:
    • Enter a valid current value for each parameter
  4. Create a query for the customer key values that references the Customer Country parameter:
    • Name this query CustomerCountryKeys and disable the load:
let CountryParamFilter = Table.SelectRows(Customer, each [Country] = #"Customer Country"),CustomerKeys = Table.SelectColumns(CountryParamFilter, {"CustomerKey"})in CustomerKeys
Since the CustomerKey column is the surrogate ...

Get Microsoft Power BI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.