Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Here is my question: I want to dynamicize a file path in Power Query. I have created two parameters, I named the first one "Month stopped" (it contains the month e.g., January, February, etc.), I named the second parameter "Year stopped", it contains the year of the stoppage (e.g., 2023, 2024, etc.). I want to insert the contents of these parameters into a query that contains the file path, but when I write my query, I get an error. Here is my query:
let
AnneeArrete = #"Année arrêté",
MoisArrete = #"Mois arrêté",
CheminFichier = "W:\PADS\3 - Service Reporting Risque\ANACREDIT\2. Déclarations\" & Text.From(Année Arreté) & "\" & Text.From(Mois Arreté) & ". " & Mois Arreté & " " & Text.From(Anné eArreté) & "\Controle ESTD_F pbi\ESTD-M\CounterpartyInstrument_F.csv",
Source = Csv.Document(File.Contents(CheminFichier), [Delimiter=";", Columns=14, Encoding=1252, QuoteStyle=QuoteStyle.None])
in
Source
could you help me solve this probleme?
Thanks in advance!
Hi @Hindhind25 ,
Not sure if this will fully fix the issue, but it looks like you're adding spaces into the parameter references where there shouldn't be any:
Pete
Proud to be a Datanaut!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |