Forum Discussion
DAX Table Sorting Months
- Anonymous1 year ago
Hi jmfillman,
If the issue still persists, I’d recommend raising a support ticket with Microsoft. The support team can look into the backend and provide more in-depth assistance tailored to your environment.
https://learn.microsoft.com/en-us/power-bi/support/create-support-ticketThanks & Regards,
Prasanna Kumar
I appreciate the responses. Setting the sort column in the data view has no impact on the order in the Matrix. The sort in the below image is correct...
but the Matrix continues to show the months in alphabetical order
Hi jmfillman , Please modify your formula and create a extra column in table. So far what i understood i you need to sort the months my April, May, June and so on for every quarter.
Date Calendar =
VAR _today = TODAY()
VAR _quarterStart = DATE ( YEAR ( _today ), ROUNDUP ( DIVIDE ( MONTH ( _today ) -1, 3 ), 0 ) * 3 - 2, 1 )
VAR _quarterEnd = EOMONTH(_quarterStart, 17)
VAR _calendar = CALENDAR(_quarterStart, _quarterEnd)
RETURN
ADDCOLUMNS(
_calendar,
"Sort Column", FORMAT( [Date] , "Fixed"),
"Fiscal Year", YEAR( EDATE([Date],6) ),
"Fiscal Month", FORMAT( [Date] , "mmm"),
"Month", FORMAT( [Date] , "mm"),
"Fiscal Quarter", "Q" & QUARTER( EDATE([Date],6) ),
"FiscalMonthNumber",
SWITCH(
MONTH(EDATE([Date],6)),
1, 10,
2, 11,
3, 12,
4, 1,
5, 2,
6, 3,
7, 4,
8, 5,
9, 6,
10, 7,
11, 8,
12, 9
)
)