Forum Discussion
Sort Month Year String Chronologically
- 4 years ago
Hi gbrenner35 ,
If you use format conversion directly, the field type of the created column is Text, and you need to use the value function to convert it to a numeric type.
FORMAT('Table'[Month Year String],"YYYYMM")Col_Format = VALUE(FORMAT('Table'[Month Year String],"YYYYMM"))
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi gbrenner35 Greg
It should be as simple as sorting. If you haven't aready, can you convert the Month Year to a Whole Number, then try to sort?
In Power BI Desktop, you'd use this to convert:
Thanks heaps,
Theo
- TheoC4 years agoCommunity Champion
gbrenner35 just took a look at your working file. It looks as though your Month Year is in text format rather than numeric which is stopping you from being able to sort by Month Year. Please convert it to Whole Number and then you will be able to sort by Month Year 🙂