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
Anonymous
Not applicable

arrange matrix rows and column

HI,

 

I have created a matrix.below screenshot is the matrix i have created.i have 2 questions associated with it.

 

Untitled.jpg

 

Q1. The row lable i need it in this order(>80%, 70%-80%, 60%-70%, 50%-60% & <25%)

 

Q2. I need to display the column in this order Q1, Q2, Q3, Q4, Q1_WK_01, Q1_WK,02.....Q1_WK13, Q2_WK_01....

 

Is there a way of doing this?

 

Thank you 

 

Regards,

Sandeep

1 ACCEPTED SOLUTION
PavelR
Solution Specialist
Solution Specialist

@Anonymous Just create dimension with those labels and column which wil determine the sort order (values 1, 2, 3 etc.). Create relationship between dimension and facts, if it is not active yet, and you're done Smiley Wink

 

Regards.

Pavel

 

 

View solution in original post

8 REPLIES 8
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

As PaveIr mentioned, the thread to customsize sort matrix rows and column is dding Sort column (values 1, 2, 3 etc.) to your dimensions, and change the default sort column (itself) to Sort Column under "Sort by column". 

 

The error message means you can't sort by a column that depends on the column you want sorted. To work around this issue, please create the Sort Column in Query Editor. Go to Edit Queries, under the Add Column tab, select Conditional Column. You can use this method to create both columns [Lable] and [Sort Column].
4.PNG

 

6.PNG

 

For more details, please refer to KGrice's reply in this link: Sort by another column error

 

Thanks,
Yuliana Gu

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

@v-yulgu-msft@PavelR@Baskar

 

Issue Resolved.

 

Thanks you guys for your support , resolution & time.

 

Regards,

Sandeep

Baskar
Resident Rockstar
Resident Rockstar

Cool,

 

For this u have to create two column, for shorting order

example :

column = switch ( column_name,

">80%", 1,

">90%", 2,

.... etc

)

1.JPG

 

 

 

 

using this column u short the original dimension column. 

 

try this , let know if any help.

 

Anonymous
Not applicable

@Baskar@PavelR

 

I created a new colum and tried sorting my original column based on this new column.I get the below error

 

error.jpg

 

I have created the original column based on the below formula.Is that creating problems?

Formula.jpg

 

Thanks for your time.

 

 

 

Regards,

Sandeep

 

 

 

PavelR
Solution Specialist
Solution Specialist

@Anonymous Just create dimension with those labels and column which wil determine the sort order (values 1, 2, 3 etc.). Create relationship between dimension and facts, if it is not active yet, and you're done Smiley Wink

 

Regards.

Pavel

 

 

@PavelR

 

Pavel, I am having trouble doing this as you described. Any help would be greatly appreciated. I created another table with the same Names for my lookup, with the sort order. Then created a relationship between that Names and my original Table Names. Howver, the option to sort by the order I created is sitll not in the sort list. Am I doing something wrong?

PavelR
Solution Specialist
Solution Specialist

Hi @ngkrich, just choose your Name column in Fields pane

Field.png

In Modeling pane click on Sort a Sort by column with sorting order.

Sort.png

That is it. Regards

Pavel

PavelR
Solution Specialist
Solution Specialist

Hi @Anonymous

 

I would recommend adding Sort column (values 1, 2, 3 etc.) to your dimensions, and on the relevant columns just use "Sort by column" and add you Sort column.

 

Regards.

Pavel

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.