Forum Discussion
jmfillman
1 year agoHelper I
DAX Table Sorting Months
I am creating a date table with the below, but whenever I drop this into a Matrix displaying columns of Fiscal Year, Quarter, and Month, the Months are in alphabetic order by quarter instead of month...
- 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
jmfillman
1 year agoHelper I
I am not able to upload a PBIX file for some reason. Hoping images showing the setup of the matrix (columns only so far) will help.
I added a numeric Month column to the table. Filtering on the month column (or any column) makes no difference to what is diplaying on the matrix.
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) )
)