Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Pasheim
Frequent Visitor

Power Query - Making a selection menu at startup

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

2 ACCEPTED SOLUTIONS
v-juanli-msft
Community Support
Community Support

Hi @Pasheim 

You could create query parameters in power query.

https://docs.microsoft.com/en-us/power-query/power-query-query-parameters

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Pasheim 

You could create query parameters in power query.

https://docs.microsoft.com/en-us/power-query/power-query-query-parameters

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors