Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.