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
srkase
Helper IV
Helper IV

RANK SORTING

I have created a rank in a amatrix.  [ 5 years]

 

I want to sort on the basis of current year rank [ 20192020].  But it is not getting sorted.

 

the measure i am using is 

RankBRN% = IF (
HASONEVALUE ( PROD_CABLE[SHORTNAME]),
RANKX ( ALL ( PROD_CABLE[SHORTNAME]), [ASONCR] ,,DESC)
)
 
I want the matrix to be sorted on current year ranking.. For that I have selected sort by Rank and applied Sort by ascending.. But I am not getting the desired result..
 
 
The result is 
7.jpg
 
Can anyone help in this regards?
 
SRK

 
2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@srkase ,

 

Modify your measure using dax below and check if it can meet your requirement:

RankBRN% =
RANKX ( ALLSELECTED ( PROD_CABLE ), [ASONCR],, DESC )

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


@v-yuta-msft wrote:

@srkase ,

 

Modify your measure using dax below and check if it can meet your requirement:

RankBRN% =
RANKX ( ALLSELECTED ( PROD_CABLE ), [ASONCR],, DESC )

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


No this is giving all ranking as 1... I want to sort it... My DAX gives the correct result ... Only thing , it is not getting sorted out based on current year ranking in the matrix..

 

 

 

 

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.