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.
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")
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 |
---|---|
96 | |
94 | |
80 | |
71 | |
64 |
User | Count |
---|---|
115 | |
106 | |
96 | |
81 | |
72 |