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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ldwf
Helper IV
Helper IV

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?

6 REPLIES 6
Kani
New Member

Is tere a solution yet for the above issues

zen07
Regular Visitor

This might work, if anyone is figuring how to do this - 
In the dataset that you add to the paginated report for getting available values for your parameter, apart from the field that you want in your parameter list, add your order field as well. After doing this, you should be able to add a ORDER BY statement following EVALUATE statement, and use your order field within that.

EVALUATE SUMMARIZECOLUMNS('TABLE'[order field], 'TABLE'[parameter field])
ORDER by 'TABLE'[order field]

 

Jon_vB
Advocate I
Advocate I

If your end user will remain in Power BI app, could you use an "interactive sort" button on the column? (assuming the thing you want to sort by is being displayed).

 

Add interactive sort to a table or matrix in paginated reports - Microsoft Report Builder & Power BI...

 

My goal is to change how it is sorted when delivered by subscription to my end user (in Excel).  so, I'm still looking for a solution to this.  perhaps the parameter can be in the Dax.. haven't tried yet.

mleeson
Regular Visitor

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
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ 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
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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