Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a date table with added columns, created a relationship, date slicer and matrix visual and cannot seem to find the reason the sort wont work correctly. December should not be first. I would like to sort by month/year with the oldest first. I also have the date table marked as date. What am I missing?
Thank you,
Solved! Go to Solution.
Mond - Your suggestion got me in the ball park for the next step. I'm sure you would have done something similar but I found an answer here: https://community.powerbi.com/t5/Desktop/how-to-sort-Date-MonthYear-column/td-p/102700
I did what Tri Nguyen suggested by adding another numerical column which I could sort my MonthYr column by. It is multi to multi relation but not text. Worked perfectly. Thank you both!
@Anonymous,
you can sort Month by Date instead. Click on your Month in the Fields pane --> Modeling Ribbon --> Sort by Column and select Date
NickNg278 - If I understand correctly I have already done that.
@Anonymous,
select Date instead of Month (Default)
My apologies NickNg278 - I was in the process of rereading and doing what you had correctly written before and found my mistake. Having done that I get this error.
@Anonymous,
No problem. You can create another column in your date table using this format "YYYY/DD" (YearMonthnumber) then sort your Month by YearMonthNumber
Still no go. I'm thinking I have a problem to fix in the one to many relationship. I can't sort any column with multiple values by a column that has unique values without getting the same error for different columns.
The data type is "Text" on Month column.
Please change it to Date format and it should work.
Mond - Changing data type only caused errors.
Hi Hanley,
I got a question, when your Date coulmn show value (1/1/2000), how come Month value shows "Jan05".
Can you please duplicate Date column and use Data Type = Date, and Format (MMMM yyyy)
Great catch Mond - I had not added the table/column name correctly. I had only DATE when it should have been DateTBL[Date]. That gives me the correct MonthYear (Jan00) but I still cannot change format from Text to Date or sort column by Date column with out the errors. Nor fix my original problem of sorting in the correct order.
Mond - Your suggestion got me in the ball park for the next step. I'm sure you would have done something similar but I found an answer here: https://community.powerbi.com/t5/Desktop/how-to-sort-Date-MonthYear-column/td-p/102700
I did what Tri Nguyen suggested by adding another numerical column which I could sort my MonthYr column by. It is multi to multi relation but not text. Worked perfectly. Thank you both!
bump
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |