Forum Discussion
Template using excel files
- 6 years ago
Hi Anonymous
Or follow the document below
https://www.seerinteractive.com/blog/how-to-create-a-power-bi-template/
As tested, it works.
Please uncheck the "required" option and use parameter in your connection query.
Then close&&apply, go to report view, creat visuals.
when save, select "save as "->***.pbit
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The parameter is set up as a text and the Current value is the csv file. When opening the template it then promps you to enter a new file location.
The source of my file is an excel workbook with the file contents of the file location.
Anonymous ,
It looks like correct, can you share your m code ?
Also the data structure is the same for all the inputed files ?
- Anonymous6 years agoNot applicable
- camargos886 years agoCommunity Champion
Are you export the template as template ?
As soon it opens you input the filepath and it keep the model file, not the given path ?
- v-juanli-msft6 years agoCommunity Support
Hi Anonymous
You can create a query like
(filename as text)=> let Source = Csv.Document(File.Contents("*******your file location\"&filename&".csv"),[Delimiter=",", Columns=2, Encoding=65001, QuoteStyle=QuoteStyle.None]), #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]), #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"date", type date}, {"value", Int64.Type}}) in #"Changed Type"Best Regards
Maggie
- v-juanli-msft6 years agoCommunity Support
Hi Anonymous
Or follow the document below
https://www.seerinteractive.com/blog/how-to-create-a-power-bi-template/
As tested, it works.
Please uncheck the "required" option and use parameter in your connection query.
Then close&&apply, go to report view, creat visuals.
when save, select "save as "->***.pbit
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.