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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How to use ranks with multiple alphanumeric fields (variables)

Hello,

 

I would like to know if it is possible to use rankx function in DAX to order a table with alphanumeric fields (see the example below), by ordering first by amount (descending), by project then by phase.

 

Project                 phase   amount

1-BC-155-A01     2100
1-BC-155-10775000
1-BC-154-10782500
1-BC-153-10710200
1-BC-149-A01113000
1-BC-149-1071102
1-BC-080-60120105
1-BC-080-2252210000

 

Thanks in advance for your help.

 

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 


by ordering first by amount (descending), by project then by phase.

 


Then what is the excepted output for your table ?

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hello,

 

I have already test your solution and what it does, the table is sorted first by amount, then by project and finally by phase.  At the end, the table is sorted by phase.  

 

What I would like it is to be able to sort the following table:

 

expensesproject phase
5000a2
5000a1
5001b2
5001b

1

 

like in Excel, using a custom sorter with three level, 

1 for the Amount

2 for the Project

3 for the Phase

 

to obtain the following table:

 

expensesproject phase
5001b1
5001b2
5000a1
5000a2

 

I have tried the Table Sorter from the MarketPlace. But it works only with numerical data not the Alphanumeric one.

I thought that we could use the rankx function but again it seems only for numerical data.

 

So my Question is :

 

Is there a way to sort a table in Power BI using some sort of Custom Filter (2,3,4 levels) as in Excel.

Regards,

 

 

 

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.