Forum Discussion
Problem with sorting month names in calender table
Hi FrankWe
Please create a lookup table by enter data for MONTH SORT
| Month | MonthSort |
| January | 1 |
| February | 2 |
| March | 3 |
| April | 4 |
| May | 5 |
| June | 6 |
| July | 7 |
| August | 8 |
| September | 9 |
| October | 10 |
| November | 11 |
| December | 12 |
In this table month should be Sort By "MonthSort" column
Create a relationship with your fact table with "Month" column
Use "Month" from Lookup table in visual
Let me know if that works for you
If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.
Thanks
Pijush
Linkedin
Hi Pijush,
I have the same info (MonthNumber) in my calender table, too. But I will try and let you know.
Frank
- PijushRoy2 years agoCommunity Champion
FrankWe
In Calendar table, if you can use the MonthOrder as SortBy it will work but
Separate lookup table with sort by helps.
Please check and let me know
If your requirement is solved, please make CORRECT ANSWER a SOLUTION- FrankWe2 years agoHelper II
And how will the month order look like when I have a visual that should show the last three months? I need to have the following order: Nov - Dec- Jan
If I use only the MonthNumber I think I will get: Jan - Nov - Dec
🤔
Frank
- PijushRoy2 years agoCommunity Champion
Hi FrankWe
The benefits of lookup table is if your fiscal month start from July and end in June, you should update only the SortOrder column in lookup table
Please see the exampleMonth MonthSort January 7 February 8 March 9 April 10 May 11 June 12 July 1 August 2 September 3 October 4 November 5 December 6 If your requirement is solved, please make CORRECT ANSWER a SOLUTION