Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I've been trying to custom sort the parameter I created for the dashboard but could not find a way to do so. Basically I need the viz to sort by:
I saw some posts with similar requirements but none of them would work in my scenario. Any help is greatly appreciated.
Below is the sample data file:
| Employee Name | Hire Date | Gender | Age | Country |
| John Smith | 3/15/2021 | Male | 28 | USA |
| Emily Johnson | 5/20/2021 | Female | 35 | Canada |
| David Lee | 1/10/2022 | Male | 32 | UK |
| Maria Garcia | 4/5/2022 | Female | 29 | Spain |
| Michael Wang | 2/18/2023 | Male | 26 | Australia |
| Sarah Brown | 7/12/2023 | Female | 31 | Germany |
| Ahmed Khan | 3/8/2024 | Male | 46 | UAE |
| Fatima Ali | 5/19/2024 | Female | 24 | Pakistan |
| James Johnson | 8/10/2021 | Male | 34 | United States |
| Emma Wilson | 10/5/2021 | Female | 31 | United Kingdom |
| Carlos Sanchez | 3/22/2022 | Male | 29 | Spain |
| Olivia Li | 6/15/2022 | Female | 26 | China |
| Daniel Nguyen | 2/18/2023 | Male | 37 | Canada |
| Sofia Rossi | 5/20/2023 | Female | 33 | Italy |
| Mohamed Ali | 1/7/2024 | Male | 61 | Egypt |
| Mia Kim | 4/2/2024 | Female | 29 | South Korea |
| Lucas Silva | 7/12/2024 | Male | 58 | Brazil |
| Isabella Müller | 10/30/2024 | Female | 43 | Germany |
| Christopher Smith | 2/28/2021 | Male | 36 | Australia |
| Isabelle Tremblay | 6/10/2021 | Female | 30 | Canada |
| Juan Martinez | 4/15/2022 | Male | 33 | Mexico |
| Sophie Dupont | 8/22/2022 | Female | 29 | France |
| Alex Kim | 3/5/2023 | Male | 53 | South Korea |
| Elena Petrova | 6/18/2023 | Female | 27 | Russia |
| Ahmed El-Sayed | 2/12/2024 | Male | 31 | Egypt |
| Olivia Chan | 5/30/2024 | Female | 26 | Singapore |
| Matteo Bianchi | 8/9/2024 | Male | 34 | Italy |
| Emilia Schmidt | 11/27/2024 | Female | 32 | Germany |
Below is a screenshot of the visual and the slicer parameter: currently it's automatically sorted to show headcount count descending. I would like for it to show a custom sort instead.
Solved! Go to Solution.
@Anonymous , Make sure for all those columns, you create a sort column and mark that as a sort column. You can create sort column using the same column in power query and then mark it sort column in data view.
If you create a sort column, to avoid circular dependency you need do like
Gender 1 = [Gender]
Gender Sort = if([Gender] = "Female",1, 2)
Then Mark Gender Sort as a sort column for Gender 1. and use Gender 1 in Visual
How to Create Sort Columns and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
Hi,
Share the download link of the PBI file with the Age Group column and visuals already created.
@Anonymous , Make sure for all those columns, you create a sort column and mark that as a sort column. You can create sort column using the same column in power query and then mark it sort column in data view.
If you create a sort column, to avoid circular dependency you need do like
Gender 1 = [Gender]
Gender Sort = if([Gender] = "Female",1, 2)
Then Mark Gender Sort as a sort column for Gender 1. and use Gender 1 in Visual
How to Create Sort Columns and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
This worked for me. Thank you!!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 160 | |
| 132 | |
| 117 | |
| 79 | |
| 53 |