Excel filename and path

  1. Create two parameters of text data types, ExcelPlanFolder and ExcelPlanFileName:
    • The current value of the Excel file parameter should include the extension (.xlsx), and the current value of the folder should include the complete path to the Excel file (all subfolders)
  2. Create a new query, which merges these two parameters into a single text value. Name this query ExcelPlanQry:
let ExcelBudget = ExcelPlanFolder & "\" & ExcelPlanFileName in ExcelBudget
  1. Reference the ExcelPlanQry in the query (or queries) used to access the Excel workbook:
let Source = Excel.Workbook(File.Contents(ExcelPlanQry), null, true),ExcelBudgetTbl = Source{[Item="BudgetTbl",Kind="Table"]}[Data] in ExcelBudgetTbl
  • Any changes to the name ...

Get Microsoft Power BI Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.