Thomas Love Posted February 5, 2019 Share Posted February 5, 2019 I have a cross table with a horizontal axis for weeks. The weeks go over week 9 so the order in the visualization is wrong. See below: Week 1 Week 10 Week 11 Week 12 Week 13 Week 14 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Week 9 I want it to be in order Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Week 9 Week 10 Week 11 Week 12 Week 13 Week 14 I wrote a case statement that delivers "Week 1" etc... I understand the logic that it is doing by putting everything that starts with a 1 first, but I do not know how to fix it. Do I use a Rank function or is there a better way to get the weeks I do not want they system generated 43, when that may be my Week 1. I hope this makes sense. Thank you in advance for any help. Link to comment Share on other sites More sharing options...
Gaia Paolini Posted February 5, 2019 Share Posted February 5, 2019 Hi Numbers within strings are sorted like strings so e.g. 10 < 2. Try using this custom expression instead of on the cross table axis: This will extract the number from the 'Week nnn' value and cast it into an integer, which then sorts naturally in the right order. Gaia Link to comment Share on other sites More sharing options...
Thomas Love Posted April 19, 2019 Author Share Posted April 19, 2019 Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now