cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jdalfonso
Helper III
Helper III

Matrix Sorting Problem

Hi,

 

I want to sort the number under value chain (bold format) in the very first column. Sorting it by number does not change the order. 

jdalfonso_0-1669217666759.png

I want to be able to sort it by number in ascending sequence 

 

jdalfonso_1-1669217783857.png

 

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @jdalfonso ,

 

In the Power Query editor, sort the numbers in ascending order, and then add an index column.

vtangjiemsft_0-1669254719028.pngvtangjiemsft_1-1669254744090.pngvtangjiemsft_2-1669254809264.png

Click "Close and Apply" and sort the index columns in Desktop.

vtangjiemsft_4-1669254951025.png

Then the result is as follows.

vtangjiemsft_5-1669255140580.png

You can refer to the following documents that may be helpful to you:

Custom sort / reorder rows & columns in Power BI - Inforiver

Hierarchical Sorting in Power BI - Stuff by Yuki

Quick Tips: How to Sort Matrix by Column in Descending Order - BI Insight

Sorting matrices in Power BI - Kohera

 

If you want to sort by both [VALUE CHAIN] and [Number]. You can create a table 2, enter the data of the [VALUE CHAIN] field in the desired order, and then create an index column in the power query, sort by the index column, and put the [VALUE CHAIN] field of table 2 in the matrix, note that the model relationship is created between table 1 AND TABLE 2.

vtangjiemsft_6-1669255900655.png

 

Best Regards,

Neeko Tang

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

1 REPLY 1
v-tangjie-msft
Community Support
Community Support

Hi @jdalfonso ,

 

In the Power Query editor, sort the numbers in ascending order, and then add an index column.

vtangjiemsft_0-1669254719028.pngvtangjiemsft_1-1669254744090.pngvtangjiemsft_2-1669254809264.png

Click "Close and Apply" and sort the index columns in Desktop.

vtangjiemsft_4-1669254951025.png

Then the result is as follows.

vtangjiemsft_5-1669255140580.png

You can refer to the following documents that may be helpful to you:

Custom sort / reorder rows & columns in Power BI - Inforiver

Hierarchical Sorting in Power BI - Stuff by Yuki

Quick Tips: How to Sort Matrix by Column in Descending Order - BI Insight

Sorting matrices in Power BI - Kohera

 

If you want to sort by both [VALUE CHAIN] and [Number]. You can create a table 2, enter the data of the [VALUE CHAIN] field in the desired order, and then create an index column in the power query, sort by the index column, and put the [VALUE CHAIN] field of table 2 in the matrix, note that the model relationship is created between table 1 AND TABLE 2.

vtangjiemsft_6-1669255900655.png

 

Best Regards,

Neeko Tang

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

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.