Forum Discussion
Date Slider Not Handling Years Correctly
Regardless of A>Z vs. Z>A, it displays incorrectly.
A>Z it appears as follows:
January 2019
February 2019
March 2019
November 2018
December 2018
Z>A it appears as follows:
December 2018
November 2018
March 2019
February 2019
January 2019
Power BI is not correctly recognizing the year.
Anonymous by default it sorting alphabatically. You need add another column in your table to sort this month field.
Add following column in your date dimenson, change table name and column name as per your model.
Month Sort = FORMAT( Table[Date], "YYYY-MM" )
Now go to modelling tab, choose your month colum and click sort by column on the menu and select "Month Sort". This will fix the issue.
- Anonymous7 years agoNot applicable
Thanks! This seems to be on the right path. When I try to sort on "Month Sort" I get the error "This column can't be sorted by a column that is already sorted, directly or indirectly, by this column."
- parry2k7 years agoSuper User
Anonymous do you have date dimension in your model? The month column you are trying to sort, are you using the same column to create sort column?
- Anonymous7 years agoNot applicable
I have multiple "Milestone" columns for various completions, but no specfic date column (I'm pulling all of my data from an API).
I changed the "Month Sort" column to be based off of another milestone than the column I'm trying to sort and now get this error:
"We can't sort the "Sorting Column" by 'Month Sort'. There can't be more than one value in 'Month Sort' for the same value in "Sorting Coumn". Please choose a different column for sorting or update the data in 'Month Sort'.