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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
elz
Advocate II
Advocate II

What is a list query for a parameter?

I was reading the July summary of new features (https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-july-feature-summary/) and near the bottom is a section for new query parameter features.

 

It indicates that the "Allowed Values" option can be set to Query and then select Query List from the Query drop-down list

 

My questions are 1) What is a query list

                            2) How do I create one

                            3) Why is the Query field drop down list on the parameters panel, not enabled.

 

I have the august update installed.

 

Any help would be greatly appreciated.

 

Thank you

Tracy

 

 

1 ACCEPTED SOLUTION
BhaveshPatel
Community Champion
Community Champion

Hi Tracy,

 

Query list is a list of values created in the blank query using M Language. It is basically the ordered list of values and defined using comma separated values with any data type enclosed in braces. 

For example, Type the list of values of any data type in the advanced editor window.

Remove all the code in Advanced Editor and just type below list of values

{"Ryan","Matthew","Todd"} and Press Done.

 

You can use this list of values in your parameter and this can be done by creating a new parameter and in the Suggested Values field, Select Query and Query field will become active now. You can select the current value as per your preference.

 

This list of values will be shown in your parameter values.

 

Hope this has clarified ypour understanding.

For more information on this, Please visit this blog.

 

Thanks & Regards,

Bhavesh

 

 

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

7 REPLIES 7
jldubois
New Member

Hi. 

I created a query using the proposed solution described in the blog via "Add as a new query". When entering the parameter into my sql, i have an error message "Query 'Billed Labour' (Step 'Source') references other queries or steps, so it may not directly access a data source. please rebuild this data combination". 

What i am trying to do: reduce the size of my dataset by allowing the user to select a few project number only to filter the dataset, hence reducing its size. The dataset is way too big too be loaded.

I checked that using a "list of values" parameter type works fine.

Thanks for your help

JL

BhaveshPatel
Community Champion
Community Champion

Hi Tracy,

 

Query list is a list of values created in the blank query using M Language. It is basically the ordered list of values and defined using comma separated values with any data type enclosed in braces. 

For example, Type the list of values of any data type in the advanced editor window.

Remove all the code in Advanced Editor and just type below list of values

{"Ryan","Matthew","Todd"} and Press Done.

 

You can use this list of values in your parameter and this can be done by creating a new parameter and in the Suggested Values field, Select Query and Query field will become active now. You can select the current value as per your preference.

 

This list of values will be shown in your parameter values.

 

Hope this has clarified ypour understanding.

For more information on this, Please visit this blog.

 

Thanks & Regards,

Bhavesh

 

 

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Is it possible to change parameters for posted report to Power BI?

Not yet.

 

"Note that currently, parameter values can only be modified within Power BI Desktop. We’re actively working on ways to allow users to change parameter values within PowerBI.com for published reports consumed via the Web experience."

 

Read this post: https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/

Anonymous
Not applicable

Yes!

 

And it is important to point out that this list can be dynamic and not just a manually typed in list--it can be based on any other query. See the blog link Bhavesh posted above for more details about that. 

hi bhavesh,
thank you - thank you - thank you!
i was able to create the list query and use it.
tracy
BhaveshPatel
Community Champion
Community Champion

Thank you for your appreciation.

 

Thanks & Regards,

Bhavesh

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.