cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Pasheim
Regular 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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Power Query - Making a selection menu at startup

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

2 REPLIES 2
Community Support
Community Support

Re: Power Query - Making a selection menu at startup

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

Pasheim
Regular Visitor

Re: Power Query - Making a selection menu at startup

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
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors