Forum Discussion
gbrenner35
4 years agoFrequent Visitor
Sort Month Year String Chronologically
Hi, I am using Power Pivot and I am trying to sort the column DateFirstPurchase by Month and Year String chronologically, in an independent column. Currently, I am able to do it in my pivot tabl...
- 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.
gbrenner35
4 years agoFrequent Visitor
Here is another link I found on this topic, but I am having an issue applying this code to my data set.
https://community.powerbi.com/t5/Desktop/sorting-a-date-table-chronologically/m-p/281960#M125537