Forum Discussion
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")
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
- jdbuchanan71Super User
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- AnonymousNot 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
- jdbuchanan71Super 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:
- amitchandakSuper User
You are taking ".Month" that is causing that.
You need to use date only
RDD Monat = FORMAT('ORDER - Jumbo Query'[RDD];"MMM")Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601