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
Sam_L
Regular Visitor

Changing order of columns on PBI matrix

Hi All,

 

I've been stuck on this seemingly simple problem for ages and I can't understand the problem.

 

I have a matrix where column names are:

 

>180

0-30

121-150

151-180

31-60

61-90

91-120

 

I need to reorder them (they represent ranges of days) so they appear in order (0-30, 31-60, 61-90 etc etc). I managed to do this a while ago in the same desktop file with one of the two queries I needed to.

 

I somehow managed to link the data to a separate table with the days range and an [Order] field:

 

image.png

 

I can change the order by changing the number in the [Order] field as the 'Sort by Column' option has this field selected.

 

My second query data needs to work in the same way. I've set up the relationship in exactly the same way but I cannot change the order no matter what I do.

 

I've also tried separately to follow this approach which is similar:

 

https://community.powerbi.com/t5/Desktop/Matrix-Column-Head-Order/m-p/71851#M29775

 

That didn't work either. 

 

I know it's a bit of a long shot with limited info but does anyone know what might be happening? I'm completely stuck on it and can't finish this piece of work without it.

 

Any help much appreciated!

Sam.

1 ACCEPTED SOLUTION

hi, @Sam_L 

[Days waiting] field in the second matrix visual should from this separate table.

From your screenshot we could get that there is "Error" value in it, it is not match with that separate order table.

4.JPG

 

So please create another separate table for the second query and do the same with first visual.

 

If you not your case, please share your sample pbix file for us have a test.

 

 

Best Regards,

Lin

Community Support Team _ Lin
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
amitchandak
Super User
Super User

Not sure I got it completely.

You are not able to sort the column on the sort order. Is this happen even after you used sort option in a visual.

 

Screenshot 2019-09-27 14.41.41.png

@amitchandak Thanks very much for your reply. It's a bit of a tricky problem to explain actually.

I'm using the Matrix visual to build a table that should look like this (data has been removed from the actual table part):

image.png

On another version of this table (using data from a different query) I can't get the columns in the correct order:

image.png

The only sort oprtions I get from the top right menu are for the data, but I need the columns sorting. 

The first table is somehow linked (there is a one-many relationship from the days range values) to another query table where I can control the order by changing a number as per the screenshot in my original post. This works and I can set the columns to any order I like.

The problem I have is that I can't re-create this functionality in the second table. I'm not even sure why it works in the first. I've tried to re-create everything from scratch and just get the same issue. 

hi, @Sam_L 

[Days waiting] field in the second matrix visual should from this separate table.

From your screenshot we could get that there is "Error" value in it, it is not match with that separate order table.

4.JPG

 

So please create another separate table for the second query and do the same with first visual.

 

If you not your case, please share your sample pbix file for us have a test.

 

 

Best Regards,

Lin

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

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.