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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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