Forum Discussion

gbrenner35's avatar
gbrenner35
Frequent Visitor
4 years ago
Solved

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...
  • v-henryk-mstf's avatar
    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.