gino59
Active Member
- Joined
- Jul 26, 2010
- Messages
- 496
Can anyone tell me how to create and pass a variable in Power Query?
Here's the file I'm trying to retrieve but I'd like the file name to change based on the newest file in the folder. The files will all be named the same with the exception of the month and year part. Here's the Power Query code:
What would be ideal is to pass a variable based on the newest file in the folder that changes the requested file to PSO Education Pricelist - December 2014.xlsx.
Is that possible?
Many thanks!!
Gino
Here's the file I'm trying to retrieve but I'd like the file name to change based on the newest file in the folder. The files will all be named the same with the exception of the month and year part. Here's the Power Query code:
Code:
let
Source = Excel.Workbook(Web.Contents("https://xxshare.xxxxx.com/pso/education/businessoperations/Document Library/Pricing/PSO EDU Price Lists/PSO Education Pricelist - November 2014.xlsx")),
#"Education Pricelist_Sheet" = Source{[Item="Education Pricelist",Kind="Sheet"]}[Data],
#"First Row as Header" = Table.PromoteHeaders(#"Education Pricelist_Sheet")
in
#"First Row as Header"
What would be ideal is to pass a variable based on the newest file in the folder that changes the requested file to PSO Education Pricelist - December 2014.xlsx.
Is that possible?
Many thanks!!
Gino
Last edited: