cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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/

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors