Forum Discussion
MM-DDDD Sorting Order in Column Visual
- 5 years ago
Hi Sudhavi_84 ,
Yes, the code I gave was for a new column in Power Query, as DAX calculated columns are not generally recommended.
If you really need to do it in DAX, then the column formula would be:
..yearMonthSortKey = YEAR(yourTable[Date]) * 100 + MONTH(yourTable[Date])Pete
Thank you BA_Pete for your quick response.
I have MMMYYYY column in calendar. Which is perfect as below in calendar table.
Next I am going to table-->Adding Column-->Date.Year is greying out not showing me anything. Please let me know if I am missing something here.
Please any help?
Is this something we need to write in Power Query (M Editor)? Not in new calculated column?
- BA_Pete5 years agoSuper User
Hi Sudhavi_84 ,
Yes, the code I gave was for a new column in Power Query, as DAX calculated columns are not generally recommended.
If you really need to do it in DAX, then the column formula would be:
..yearMonthSortKey = YEAR(yourTable[Date]) * 100 + MONTH(yourTable[Date])Pete
- Sudhavi_845 years agoHelper V
Perfect Thank You