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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
v-yiruan-msft
Community Support
Community Support

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

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

View solution in original post

3 REPLIES 3
johnbasha33
Solution Sage
Solution Sage

@Anupal create another sort column

v-yiruan-msft
Community Support
Community Support

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors