Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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!