Version: 0.50.27 OpenSource
I have created a SQL question that I am using in a bar graph but the sort order (Week No) on the X Axis is not displaying as required. He is my dilemma I have two columns that display week numbers (WeekNo and CustomRankWeekNo). The first column WeekNo is standard week 1 to 52, the second CustomRankWeekNo derives the week number based on a selected variable Region value. The logic is if the user selects variable value 'A' a case statement is used to rank the weeks for A, essentially "A" calculates it week start from week 45 in 2025 and finishes week 44 in 2025.
*CASE*
* WHEN WeekNo >= 45 AND WeekNo <= 52 AND Region LIKE 'A' THEN WeekNo -44*
* WHEN WeekNo >= 1 AND WeekNo <= 44 and Region like 'A' THEN WeekNo + 9*
* ELSE WeekNo END AS CustomWeekRank,*
I am using a Order By CustomWeekRank in the SQL.
When Region 'A' is select I want the graph to display the WeekNo. Starting with week 45 as the first week. example bar chart x axis Starts at 45,46,47,48,49,50,51,52,1,2,3,4,5,6,7,8,9,10,11,12,13..... and so on.
This is how the graph looks with weekno as the x axis and SQL order by CustomWeekRank:
There doesn't appear to be a display axis and sort by another axis option in the visualization section.