Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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 

1 ACCEPTED SOLUTION

@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:

sortby.jpg

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super 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

jdbuchanan71
Super User
Super 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

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 

 

@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:

sortby.jpg

Anonymous
Not applicable

Thank you @jdbuchanan71 . It worked (as you can see in the lower figure in the screenshot)!

 

How ever, im still wondering if there is no "simplier" way to shorten the month to "MMM" directly in the figure / dashboard, without creating new columns. If its not the case your proposed solution is fine as well. 

 

Upload.PNG

 

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.