Reply
Highlighted
Member
Posts: 68
Registered: ‎06-22-2018
Accepted Solution

Sorting on a calculated column containing a switch statement

[ Edited ]

I have the following bins/groups created for my data using this switch statement;

 

switch.JPG

 

 

 

 

 

 

 

 

Ends up looking like this on a sorted line chart;

 

axis.JPG

 

 

 

 

 

 

 

 

As you can see the sorting is all over the place, I believe its now trying to sort on text values. How can I sort in asc order? 

 


Accepted Solutions
Community Support Team
Posts: 1,343
Registered: ‎07-25-2018

Re: Sorting on a calculated column containing a switch statement

Hi @rax99

 

You may try to add an order column as below. Then drag it to 'Tooltips' to sort the chart.

Order = PATHITEM( SUBSTITUTE(Table1[Text],"-","|"),1,INTEGER)

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
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


All Replies
Community Support Team
Posts: 1,343
Registered: ‎07-25-2018

Re: Sorting on a calculated column containing a switch statement

Hi @rax99

 

You may try to add an order column as below. Then drag it to 'Tooltips' to sort the chart.

Order = PATHITEM( SUBSTITUTE(Table1[Text],"-","|"),1,INTEGER)

1.png

 

Regards,

Cherie

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