cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rax99 Member
Member

Sorting on a calculated column containing a switch statement

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? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

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.
1 REPLY 1
Highlighted
Community Support Team
Community Support Team

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.