Forum Discussion
Karolina411
Helper V
4 years agoDate mismatches
Hello So...my date column in my date dimension is not working all of a sudden----I tried to ensure both are dates only but that is not working - when I use MONTHDATE (as below) it cannot get into da...
Anonymous
4 years agoNot applicable
Hi Karolina411,
Try the solution in this link, add a new column and sort the Month column using the new column.
https://community.powerbi.com/t5/Desktop/not-able-to-sort-by-months-in-chronological-order/m-p/61035
Karolina411
Helper V
4 years agoI can hardly understand how he wrote those complex instructions....how can there be a program that does not sort dates in chronological order?
- Anonymous4 years agoNot applicable
Right Click "DIMDATE", Add a new column, and type in the following code:
yearMonth = RIGHT(YEAR('DIMDATE'[DateValue]),2) &SWITCH(MONTH('DIMDATE'[DateValue]),1,"01",2,"02",3,"03",4,"04",5,"05",6,"06",7,"07",8,"08",9,"09",10,"10",11,"11",12,"12")Then Left Click the "FormattedMonthYear" under "DIMDATE" and sort the column by "yearMonth"
- Karolina4114 years ago
Helper V
Thank you ..I will try this later today...appreciate the clarity
- Anonymous4 years agoNot applicable
No problem, I'm new to Power BI as well and I faced the same problem a few days ago. That was the way I solved it. Hope it can solve yours as well 😃