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
ldwf
Helper II
Helper II

Paginated Report-Can you sort the parameter dropdown list by a field not in the parameter list?

I have a PBI Paginated Report with a parameter list.  The data source is a dataset model, so no SQL with an order by statement in this scenario is used.  The list is sorted in alphabetical order, but I need it sorted in another order, i.e, by another field defined in the model.  Is there a way to get the parameter dropdown values to be sorted by this other field that is not to  be displayed in the dropdown?

3 REPLIES 3
mleeson
New Member

Is there a solution yet to this? 

Sahir_Maharaj
Super User
Super User

Hello @ldwf,

 

Here are two possible approaches:

  1. Modify the dataset model: In the dataset model, you can adjust the sorting of the underlying table or query by the desired field. If the parameter dropdown is based on a dataset table, you can set the sorting order of that table by the desired field. Save the changes to the dataset and refresh the report to reflect the new sorting order in the parameter dropdown.

  2. Modify the query: If your dataset uses a query to retrieve data, you can modify the query to include an ORDER BY clause that sorts the data by the desired field.

SELECT Field1, Field2
FROM YourTable
ORDER BY AnotherField

Let me know if you might require any further assistance.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
P.S. Want me to build your Power BI solution?
Data Scientist | Data Engineer | Data Analyst | AI Engineer

➤ Website: https://sahirmaharaj.com

➤ Email: sahir@sahirmaharaj.com

➤ Lets connect on LinkedIn: Join my network of 12K+ professionals

➤ Want me to build your Power BI solution? Lets chat about how I can assist!

➤ Join my Medium community of 30k readers! Sharing my knowledge about data science and artificial intelligence


LinkedIn Top Voice in Artificial Intelligece, Data Science and Machine Learning

Hi @Sahir_Maharaj .  I did modify the model to sort by the other field.  It does sort the fields but when used in a parameter, by default the parameter still sorts by the original field, not by the other field.  I can instead use a SQL statement in my Paginated Report to get around this problem, but the intent is to use our PBI model (i.e, the published dataset) instead of SQL queries.  So instead of using SQL, I'm looking for a way to sort the parameter values in the dropdown another way

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