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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
sprasad
Helper II
Helper II

Sort By in the Visual

In the graphic visual I want to do a "Sort By" 2 items? Is it possible? Right now I can sort by only one item .

5 REPLIES 5
PattemManohar
Community Champion
Community Champion

@sprasad  Try creating a unique key field as a supporting field for sorting, for each combination of fields that you want to sort on. Then, use that new field as your sorting column.





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Explain a bit on how do it?

Take this example

DatabaseOperating SystemBrowser
Oracle 11gWindows 10Chrome
SQL Server 2016Windows Server 2012Chrome
SQL Server 2016Windows 10Chrome
SQL Server 2016Windows 10Safari
SQL Server 2014Windows 10IE
Oracle 12cWindows 10Chrome
PostgresWindows 10IE
SQL Server 2016Windows 10Chrome
SQL Server 2016Windows 10Chrome
SQL Server 2016Windows Server 2016Chrome
SQL Server 2016Windows 10Safari
SQL Server 2016Windows 10Chrome
SQL Server 2016Windows 10Chrome
SQL Server 2016Windows 10Chrome
SQL Server 2016Windows 10Chrome

Hi @sprasad 

In this example, do you want the "Database" sorted by "Operating System" and "Browser" as below?

5.png

 

Which visual do you need to sort as your said?

Which columns do you add in the visual? one column or serveral columns?

 

Best Regards

Maggie

Maggie,

 

I need to all all the 3 coulumns in the visual and I should do the sorting of Database and Operating system.

Thanks

Sudhir

Hi @sprasad 

one workaround is create a calcuated column

Column = [Database]&[Operating System]

add this column in the table

click on the column header to select "desc"/"asc".

1.png

If you want sort by first column ASC and sort by second column DESC.

you could create rank measures to sort by.

for example.

create measures, then click on "rank3" measure header to sort

Measure1 = MAX(Table1[Database])

Measure2 = MAX(Table1[Operating System])

Rank1 = RANKX(ALL(Table1),[Measure1],,ASC,Dense)

Rank2 = RANKX(ALL(Table1),[Measure2],,DESC,Dense)

Rank3 = [Rank1]&[Rank2]

4.png

 

Best Regards

Maggie

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors