+ Reply to Thread
Results 1 to 4 of 4

Trying to Create a Power Query Parameter where you can Select Multiple Values

  1. #1
    Registered User
    Join Date
    08-30-2020
    Location
    orange, CT
    MS-Off Ver
    Office 365
    Posts
    2

    Trying to Create a Power Query Parameter where you can Select Multiple Values

    I've attached an image of parameters I am using in an excel spreadsheet. I cannot attach the actual spreadsheet for privacy reasons unfortunately. I am using these parameters to filter down a large query from a SQL database. Is there a way to enter or select multiple values for the parameter rather than just having to input them each one by one? For example, I'd like to be able to choose both 2018 and 2019 for the Year rather than having to type them in and look at them separately.



    I appreciate any insight on this or even if you feel there may be a good way to at least begin to approach this, I'd be happy to hear your thoughts. (i.e. Using VBA or Power Query Advanced Editor to code a solution). Thanks in advance!
    Attached Images Attached Images

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: Trying to Create a Power Query Parameter where you can Select Multiple Values

    Since you are unable to share a file, I can only direct you to a YouTube tutorial that allows you to select multiple parameters instead of providing Mcode for your specific situation.

    https://www.youtube.com/watch?v=gK2yBpiITvI
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    08-30-2020
    Location
    orange, CT
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Trying to Create a Power Query Parameter where you can Select Multiple Values

    Hello,

    I created a dummy file for this. Essentially, I'd like to be able to input multiple values into the Parameter table (on the Query with Param sheet) and have the data filtered by the values. I also created lists of the values for the parameters in case that may make for an easier solution.

    Thank you,

    Nick
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: Trying to Create a Power Query Parameter where you can Select Multiple Values

    I have created a parameter Table and linked it to your financials table. The Mcode is as follows. Look at the file for how all of this is tied together.
    Filtered data is on Sheet1
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  2. Updating a Parameter through VBA in Power Query
    By RAC81_12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2020, 09:49 AM
  3. Replies: 2
    Last Post: 01-01-2020, 04:03 PM
  4. [SOLVED] Power Query Filter by Date Parameter
    By tkrupka in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-16-2019, 10:08 AM
  5. Power Query: Using a Parameter to specify a source table name.
    By learning new things in forum Excel General
    Replies: 0
    Last Post: 11-06-2018, 04:21 PM
  6. Power Query - Parameter not working
    By vibajajo64 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-20-2018, 01:08 AM
  7. Dynamic Parameter Using Power Query
    By NeedForExcel in forum Excel General
    Replies: 1
    Last Post: 06-16-2016, 02:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1