Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi Everyone,
I cannot find a way to refer a parameter to the file path parts.
Is there any way to do this? Or Power BI Desktop Developer has oversight of this.
Have you tried the Advance Editor and adding a parameter directly to the M code?
How to add in Parameter in the Advance Editor? I have tried to put just the name of the parameter but it failed.
Thanks
I created a parameter in the Query Editor. I called it myParameter and set it to TEXT with a value of c:\temp\a.csv
I then edited the M code via the Advanced Editor and made the change in red. Note all text is case sensitive
let
Source = Csv.Document(File.Contents(myParameter),[Delimiter=",", Encoding=1252])
in
SourceI could then change the value for the parameter in the query editor to say, c:\temp\b.csv and when I refresh I see the contents of the new file.
Does that help? I can send a sample PBIX file if you like.
Thank you so much for your help.
I have done my parameter ValuationDate and it is a number.
IT is the current month in the form of YYMM. Y stands for year, M stands for month.
Every month there will be new file in the folder with something like Report_1710.csv
I have tried
Source = Csv.Document(File.Contents("C:\Report_" & Number.ToText(ValuationDate) & ".CSV"),[Delimiter=",", Columns=76, Encoding=1252, QuoteStyle=QuoteStyle.None])
but it is still failed.
Thank you so much again for your help.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 38 | |
| 31 | |
| 27 | |
| 26 |