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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.