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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anupal
Frequent Visitor

sort by field value in decending order

Hello Friends,

 

I need to sort my matrix in decending Order by field(Product) value.

 

 

Current Setup   
 Product
Account Name

END POINTS       

HYBRIDSAAS
AAAAAA888885555522222
BBBBBB7777744444111111
CCCCCC66666333330
    
    
Expected Sorting(Decending)   
 Product
Account NameSAASHYBRIDEND POINTS
AAAAAA2222255555888888
BBBBBB11111144444777777
CCCCCC033333666666

 

How can I do that?

 

 

Thanks

AP

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anupal ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. Create a product sort dimension table just as below screenshot and sort the column [Product] by the field [Sort]

vyiruanmsft_2-1712292507892.png

vyiruanmsft_3-1712292537610.png

2. Create the measures as below

Measure = 
VAR _product=SELECTEDVALUE('Sort'[Product])
RETURN CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Product]=_product))
Sum of value = SUMX(VALUES('Sort'[Product]),[Measure])

3. Create a matrix visual (Rows: [Account Name]  Columns: [Product] of dimension table  Values: [Sum of value])

vyiruanmsft_0-1712292442748.png

In addition, you can refer the following blog to get it.

Sort a Column with a Custom Order in Power BI - RADACAD

Best Regards

View solution in original post

3 REPLIES 3
johnbasha33
Super User
Super User

@Anupal create another sort column

Anonymous
Not applicable

Hi @Anupal ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. Create a product sort dimension table just as below screenshot and sort the column [Product] by the field [Sort]

vyiruanmsft_2-1712292507892.png

vyiruanmsft_3-1712292537610.png

2. Create the measures as below

Measure = 
VAR _product=SELECTEDVALUE('Sort'[Product])
RETURN CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Product]=_product))
Sum of value = SUMX(VALUES('Sort'[Product]),[Measure])

3. Create a matrix visual (Rows: [Account Name]  Columns: [Product] of dimension table  Values: [Sum of value])

vyiruanmsft_0-1712292442748.png

In addition, you can refer the following blog to get it.

Sort a Column with a Custom Order in Power BI - RADACAD

Best Regards

Anupal
Frequent Visitor

Updating the details-

 

Current Setup  
 Product
Account NameEND POINTSSAAS
AAAAAA8888822222
BBBBBB77777111111
CCCCCC666660
   
   
Expected Sorting(Decending) 
 Product
Account NameSAASEND POINTS
AAAAAA22222888888
BBBBBB111111777777
CCCCCC0666666

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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