Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi there,
I have to show the first 3 letters of the months in order for my table to fit properly. I do not need years to be visible.
I already have a date hierarchy [FirstOfMonth], and created a 3 letter abbreviation calculated column [3LetterMonth]
When I add the calculated column it returns as a text and not date. When converting the [3LetterMonth] column to a Date data type I recieve an #ERROR.
My formula for the calculated column is
3LetterMonth = FORMAT(table_name[FirstOfMonth],"MMM")
Solved! Go to Solution.
You don't need to format this as a date. You can extract the first 3 letters from your month and then sort the column.
Select your field (mine is "first 3") and click column tools > Sort by columns > month number (or months if they're sorted correctly)
This will give your abbreviated column the sort order you expect.
You don't need to format this as a date. You can extract the first 3 letters from your month and then sort the column.
Select your field (mine is "first 3") and click column tools > Sort by columns > month number (or months if they're sorted correctly)
This will give your abbreviated column the sort order you expect.
Hi @Anonymous
Use a date table lile this (with MonthNumber and MonthName)
Month number
Month Name:
Now use the sort by column feature -> sort name by number
When you now use the name column it will be sorted correctly.
Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
hi @Anonymous
why not directly reference the date column, try like:
3LetterMonth = FORMAT(table_name[date],"MMM")
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
114 | |
98 | |
96 | |
68 | |
67 |