Forum Discussion

rkumar's avatar
rkumar
Icon for Helper III rankHelper III
8 years ago
Solved

Short Date Format(01 Jan 2018)

Hi All,
We need to convert date from any format to dd mmm yyyy format eg '2018-03-21' to '21 Mar 2018' and sort it. 
Is is possible to do that .

 

Thank You

  • Hi rkumar,

     

    To change format, click Modeling->Format->14 March, 2001(d MMMM,yyyy).

    To sort, right click on the column then click “Sort Ascending” or “Sort Descending”.

     

    Regards,

    Jimmy Tao

8 Replies

  • vanessafvg's avatar
    vanessafvg
    Icon for Community Champion rankCommunity Champion

    rkumar where are you trying to sort it and in what?  most visuals allow you to sort

     

    as for the format

     

    format(datecolumn, "d MMM yyyy")

     

     

    • rkumar's avatar
      rkumar
      Icon for Helper III rankHelper III

      We are trying this in waterfall chart.

      We have a date column with date format as '01 March 2017' . When we use this in Category field, it is showig fine in x axis . Data is showing fine and we are able to sort also.
      But the requirement is to show date as '01 Mar 2017' now when we make the required changes in PowerBI or database to achieve this this, the new column datatype changes from date to text and then the sorting fails.


      • vanessafvg's avatar
        vanessafvg
        Icon for Community Champion rankCommunity Champion

        rkumar then use a numerical date to sort the text date by as, i.e

         

        ie under modelling tab use sort by column and use a numerical expression of the date to sort by

         

        does that make sense?

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    Hi rkumar,

     

    To change format, click Modeling->Format->14 March, 2001(d MMMM,yyyy).

    To sort, right click on the column then click “Sort Ascending” or “Sort Descending”.

     

    Regards,

    Jimmy Tao