Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am using Power Query to make a summarized ovierview of status on components in a datacenter. Every month, sours files are automatically generated an put in its designated folder. I am then using "Get Data from Folder" and specify which filenames I want the data from. However, as it is now, I have to make a new month folder for the source date every month.
What I would like to happen, is that when I start the Excel workbook Template, I get a question box asking med for which month/year I want to report data from. This question box generate a variable I then can use to filter out all data from source files with "Modidified date" withing specified month/year.
Ex:
Filname Date Modified
15-01-2020 Source datacenter 1.csv 12.01.2020
15-02-2020 Source datacenter 1.csv 12.02.2020
15-03-2020 Source datacenter 1.csv 12.03.2020
15-01-2020 Source datacenter 2.csv 12.01.2020
15-02-2020 Source datacenter 2.csv 12.02.2020
15-03-2020 Source datacenter 2.csv 12.03.2020
I get data from the folder and specify that I only want data from files containing name "Source datacenter 1". However, this will collect data from all the months (01-03). I would like to be able to answer "Which month and year would you lik a report on" when I start the document, and then the queries use this variable to select all data ONLY from those specified dates (files with this "Modidified date").
I am fairly new to using Power Query - so does anyone have a suggestion for me on how to approach this? That would help me a lot.
Pål
Solved! Go to Solution.
Hi @Pasheim
You could create query parameters in power query.
https://docs.microsoft.com/en-us/power-query/power-query-query-parameters
Ah - thank you, Maggie. I believe this does the trick. After your tip, I also found this:
https://www.youtube.com/watch?v=gK2yBpiITvI
Best regards
Pål
Hi @Pasheim
You could create query parameters in power query.
https://docs.microsoft.com/en-us/power-query/power-query-query-parameters
Ah - thank you, Maggie. I believe this does the trick. After your tip, I also found this:
https://www.youtube.com/watch?v=gK2yBpiITvI
Best regards
Pål
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |