Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Multiple values per parameter using power query

0

Hi,

How to create a parameter query that takes multiple values?

I have 2 query tabs(PQ) initially eventually it would be more tabs(different views- detailed and specific) that are embedded with SQL code. In the parameter tab, I have the parameter query table that only takes one value for now. When the value is entered under the Value field and refreshed it should fetch one or more ID details in the query tabs.

Adding a slicer would not be much of help here as a slicer is applied per table/pivot. Correct me if I'm wrong.

Is there a workaround?

Thanks

Answer
Discuss

Discussion

Dr Liss

I'm not clear what you are trying to do here- the sample file (Parameter sheet)  doesn't show the desired output from those queries. Please clarify your original question/ provide a more instructive file.

On Slicers, they can be applied to multiple pivot tables only if they share the same source data (so no use to you here!).
John_Ru (rep: 6102) Jul 8, '21 at 12:29 pm
Thanks, John_Ru.
As I'm a newbie to PQ, I learned to pass parameters through a yt video(see below) and I have revised my attachment above; see Sheet1
Click here
Hope it helps
Dr Liss (rep: 26) Jul 9, '21 at 7:45 am
Dr Liss

Thanks but the new file didn't help- Sheet1 shows your Power Queries including your one parameter but I can't see (and don't want to connect to) your SQL sources.

Furthermore the YouTube video already shows you how to create a table with several parameters (and use them in PQs) so what are you asking about? Do you mean "Can a single parameter include several values?" perphaps?

Perhaps others can tell what you're trying to do and help you. I can't for now. (I assume you'll later use the Worksheet_Change event to detect a change in your table values and to refesh your queries).
John_Ru (rep: 6102) Jul 9, '21 at 9:39 am
Add to Discussion



Answer the Question

You must create an account to use the forum. Create an Account or Login