1

I'm trying to make a Power BI template, where upon open, will prompt user to input the path to the source data file. How can I do that, with what language?

1 Answer 1

3

You can use Power BI Templates and connection specific parameters to achieve that.

First create your report the normal way. When it is ready, define a text parameter for the file name - click Transform data to open Power Query Editor, and then click Manage parameters and add a new parameter:

enter image description here

Make sure the type is Text and set the current value to be the path to the file that you used to build the report. The open your query (or queries) in the Advanced editor (right click the query) to show the M code and locate the file name and path to the source file:

enter image description here

Change the hard-coded file name and path with the name of the parameter defined above:

enter image description here

Close and apply Power Query Editor and from File -> Save as save your report as a template (.pbit file). When this template file is opened, it will prompt for entering values for the defined parameters, i.e. for the path to the data source file:

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Perfect, thank you. I'm marking this as answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.