Forum Discussion
Last month
Hello,
I have date table, then I create a new column call Month Name using
Month Name = FORMAT('Date'[Date],"MMMM")And I have Month Number for sorting this month name become a proper sorting.
It returns September. How can I make it return December? Since the max of the month is December.I want to return it always the biggest month name based on sorting on the Month Number
Thnak you.
Hi Nihed ,
If the Month Number column is of text type, the September will be the largest as you described.
Change the Month Number data type to Whole number, it will be sorted numerically from smallest to largest.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
4 Replies
- AnonymousNot applicable
Hi Nihed
can you try this measure?
Max Month = CALCULATE( Month Name, Month Number = MAX(Month Number))- NihedHelper III
what do you mean by Month Name lease?
- amitchandakSuper User
Nihed . I think Aditya Suggested the month name column you created
a measure Like
maxx(filter(all(Date), Date[Month Number] = max(Date[Month Number])), Date[Month Name])
- v-yanjiang-msftCommunity Support
Hi Nihed ,
If the Month Number column is of text type, the September will be the largest as you described.
Change the Month Number data type to Whole number, it will be sorted numerically from smallest to largest.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please considerAccept it as the solution to help the other members find it more quickly.