Power BI templates can be created from Power BI Desktop files as a means of providing users and other report authors with access to pre-defined metadata such as M queries, DAX measures, model relationships, and report visualizations. As the template files do not contain actual data, they're very lightweight and, for import mode models, data is only retrieved when the template is opened. Additionally, if query parameters have been configured, a user interface is provided for entering parameter values and these parameters can be integrated with the source queries and other components of the dataset.
In this recipe, a parameter and supporting query is added to a Power BI Desktop file to support the distribution of a Power BI template.