Forum Discussion
Jeffery24
Helper I
7 years agoAdvanced Editor data source variable/parameter issue
Hi, My dashboard has varying data source and I was following the http://datachant.com/2016/04/29/power-bi-templates/ setup up a text parameter to change the source name based on user input. The end ...
- 7 years ago
Got it to work in the end with multiple parameters and a query. Full example below. Thanks goes to @ pkoetzing for his post
let Source = SharePoint.Files(SourceID, [ApiVersion = 15]), FileID = Source{[Name=MyFileParameter&".xlsx",#"Folder Path"=MyPathParameter]}[Content], #"Imported Excel" = Excel.Workbook(FileID), Sheet1_Sheet = #"Imported Excel"{[Item="Sheet1",Kind="Sheet"]}[Data], #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]), #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Container Type", type text}, {"Referance", type text}, {"Max Fill", Int64.Type}, {"Max Weight", Int64.Type}, {"TEU", type number}, {"Target Fill", Percentage.Type}}) in #"Changed Type"