Forum Discussion

tlwest86's avatar
tlwest86
Helper I
4 years ago
Solved

Sort By Column Not Working / Help with Dates Table

I created a Matrix Visualization to display progress over my Agency's fiscal year, which starts in October (seen in the first screenshot).  I used a date table (seen in the 2nd screenshot) which I have used several times in the past, but it is no loner working as expected.  I previously achieved this by creating a column called 'Fiscal Year' that assigned October as 1, November as 2, December as 3, and so forth.  I then clicked the 'Sort By Column' button and selected the 'Fiscal Year' column (also 2nd screenshot).  I want the columns to be arranged by the 'Fiscal Year' column, which means the columns should be Oct, Nov, Dec, then Jan, but they are sorted alphbetically. 

 

I know my quarter column is not coded right so I could use some help there as well.  I put the code of the Dates table at the bottom.  Also, is there a way to add weeks to the my dates table?

My dates table looks like this:

Dates =
VAR BaseCalendar =
CALENDARAUTO(9)
RETURN
GENERATE (
BaseCalendar,
VAR BaseDate = [DATE]
VAR YearDate = YEAR (BASEDATE)
VAR MonthNumber = MONTH (BASEDATE)
VAR Quarter = QUARTER(BASEDATE)
RETURN ROW (
"Day", BaseDate,
"Year", YearDate,
"Month Number", MonthNumber,
"Quarter", BaseDate,
"Month", FORMAT (BaseDate, "mmmm"),
"Year Month", FORMAT (BaseDate, "mmm yy")
 
))

12 Replies