Reply
Highlighted
Member
Posts: 62
Registered: ‎07-06-2018
Accepted Solution

Sort by column not working

I have a Matrix and I want the Row item to be sorted in a specific order.

I created a column in Query Editor called 'Order' and i've used an IF statement to define the order as 01, 02, 03 etc. I ensured the column is a Whole Number

 

I've then sorted my Row item by the Order column in the Modelling tab, and it's made no difference to the order whatsoever!

 

Below are some screenshots, have I missed something obvious?

 

Screenshot1.PNGIn Query Editor, the Order column is 'whole number'Screenshot2.PNGThe M Query formula used to create the 'Order' columnScreenshot3.pngThe Row item is sorted by 'Order'Screenshot4.png


Accepted Solutions
Member
Posts: 62
Registered: ‎07-06-2018

Re: Sort by column not working

@Greg_Deckler

 

Wow do I feel stoopid. It had not occured to me to check WHAT order it was using. When I did, I realised it WAS using the right order. I must have had my Matrix sorted by something else, when I clicked on my Row Item to sort by that, it works!

 

Sorry for all the fuss!

View solution in original post


All Replies
Super User
Posts: 10,536
Registered: ‎07-11-2015

Re: Sort by column not working

I'm missing something, all of your Order's are 1?

 


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


Member
Posts: 62
Registered: ‎07-06-2018

Re: Sort by column not working

@Greg_Deckler

 

That's just a bad preview - if the P&L item is Gross Written Premium (which all of the first rows are) then the order number is 1. 

I have checked the full dataset and there are numbers 1-19 in there I promise. 

Super User
Posts: 10,536
Registered: ‎07-11-2015

Re: Sort by column not working

OK, so what order are you seeing?

 

1

11

12

13

14

15

16

17

18

19

2

3

...

 

Or something else?


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


Member
Posts: 62
Registered: ‎07-06-2018

Re: Sort by column not working

@Greg_Deckler

 

Wow do I feel stoopid. It had not occured to me to check WHAT order it was using. When I did, I realised it WAS using the right order. I must have had my Matrix sorted by something else, when I clicked on my Row Item to sort by that, it works!

 

Sorry for all the fuss!