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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.