Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Date Format

Hi There, 

 

I have a date column called "RDD" with dates e.g. "30.01.2018".

Based on that I want to create a new column "RDD Monat" with dates to be in MMM format e.g "Jan". 

 

What I did - I created a new column: 

RDD Monat = FORMAT('ORDER - Jumbo Query'[RDD].[Month];"MMM")

 
Unfortunately Power BI shows me the months in format "January" "February" "March" etc.
I want the months to be only in three characters e.g. "Jan", "Feb", "Marc" etc. 
 
How can I achieve that?  

 

Thank you in advance. 

 

Best

Anil 

  • Anonymous 

    You can add a column to correct the sort order.  What we need is the month number like so.

    Month Sort = MONTH ( 'ORDER - Jumbo Query'[RDD] )

     Then you select the [RDD Monat] column and set the sort order to the [Month Sort] column.  Here is an example from another project on how to set the sort by column:

5 Replies

  • Hello Anonymous 

    You should not have to call the .[month] portion of the date, can you try it like so?

     

    RDD Monat = FORMAT('ORDER - Jumbo Query'[RDD];"MMM")

     

    When you call [RDD].[Month] you don't get a date, you get "January" and formating with "MMM" needs a date.

     

    If this solves your issues please mark it as the solution so that others can find it easily. Kudos 👍 are nice too.
    John

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi jdbuchanan71 , 

       

      thank you for the quick response.

       

      Thats true; now my column in data shows "jan" instead of "january". 

      Unfortunately there is the problem that my line graph is not sorted by month. Now it shows Apr, Aug, Dec. Etc. 

       

      Is it because the data is formatted as text?

      The initial idea was only to reduce the month letters in my graphs. Is there another way?

       

      Best,

      Anil 

       

      • jdbuchanan71's avatar
        jdbuchanan71
        Super User

        Anonymous 

        You can add a column to correct the sort order.  What we need is the month number like so.

        Month Sort = MONTH ( 'ORDER - Jumbo Query'[RDD] )

         Then you select the [RDD Monat] column and set the sort order to the [Month Sort] column.  Here is an example from another project on how to set the sort by column: