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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pedroccamara
Helper II
Helper II

display date in graph like "mmm"

Hi everyone

My date field is properly formated as dd-mm-yyyy.

But on graphics i would like to only show "mmm" for month in order to get a smaller report.

Is this possible? How?

Many thanks to you all

Regards

Pedro

4 ACCEPTED SOLUTIONS
BhaveshPatel
Community Champion
Community Champion

Either you can create a new calculated column and use format function or

 

Go to the Query editor, Select the Transform Tab and in the fifth section (Date & Time Column), Select Date drop down , Go to the Month and Select fifth option "Name of Month", Load the Query after you are done.

 

This is easy and just few clicks on the ribbon.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

hemantsingh
Helper V
Helper V

Hi @pedroccamara,

 

  You can use calculated column for this purpose.

 

monthname = text(date,"mmm")

 

    where monthname is the name of the calculated column,date is the is the name of the column which is carrying all qualified dates.

 

Hope it helps.

View solution in original post

Hi Pedro,

 

u can create a new column like this:

 

 colunaCalendario.png

 

You can make a new table calendar. See this video (in portuguese)

 

https://www.youtube.com/watch?v=1_CG6W_ypgk

 

 

EDIT. to order by month see this one

https://www.youtube.com/watch?v=BEz38TAROuQ&t=14m57s

 

abs

eduardo

View solution in original post

12 REPLIES 12
Caligula
New Member

Hi, I realize this is an older inquiry, but perhaps my response can still be helpful to someone. There's a straightforward method to achieve what you need.

Step 1: Prepare your data. In Data Transform mode, navigate to your data column and extract the first month's name and its corresponding number. (You may need to duplicate the column to retain the original data after extraction.) If the data you want to display doesn't start from January but, for example, from April, you can add a custom column. This column will appropriately reorder the month numbers, assigning April as 1, May as 2, and so forth.

(= IF [month_number] >= 4 THEN [month_number] - 3, ELSE IF [month_number] < 4 THEN [month_number] + 9, ELSE NULL)

Ensure this column is formatted as a numerical column.

Step 2: Go to the Visualizations tab and drag the month_name variable to your x-axis tab.

Step 3: Navigate to the Column Tools tab. The simplest way is to click on your month_name column's name in the data panel. When the Column Tool ribbon appears, go to the 'Sort by column' tab, and select the custom column you created in step 1.

credits to awesomebisklls (https://www.youtube.com/watch?v=3ZDtmyCNbc8

Have a fun 

 

 

hemantsingh
Helper V
Helper V

Hi @pedroccamara,

 

  You can use calculated column for this purpose.

 

monthname = text(date,"mmm")

 

    where monthname is the name of the calculated column,date is the is the name of the column which is carrying all qualified dates.

 

Hope it helps.

Hi Hemant,

 

Just to Clarify, PowerBI doesn't have TEXT Function like Excel. DAX has FORMAT Function and the Syntex for this function is similar to TEXT Function in Excel. 

 

MONTH NAME=FORMAT(TABLE[COLUMN NAME], "MMM")

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

ok then.

After i've created a new column with only first 3 letters from month, they're not showing me in order....but alphabeticaly.

Can i do something about it?

Hi Pedro,

 

u can create a new column like this:

 

 colunaCalendario.png

 

You can make a new table calendar. See this video (in portuguese)

 

https://www.youtube.com/watch?v=1_CG6W_ypgk

 

 

EDIT. to order by month see this one

https://www.youtube.com/watch?v=BEz38TAROuQ&t=14m57s

 

abs

eduardo

Olá Eduardo

The problem is that when i get my report, month in columns and the detail next on lines, it shows me (on columns) first April, August, etc. instead of Jan, Feb, etc.

That means still in the same way as b4.

At least i've learn how to do a calendar file.

And yes i did associate that new calendar table to the other one and use the new column (mmm).

But it didn't work.

Did i miss something?

 

Obrigado

1 abc

Pedro

Hi again Eduardo

Please forget my last message.

It's working now.

Don't know what happened but i've done again the month number and the month name and it's working great!!.

Many thanks for your pacience.

Best regards

Pedro

Olá Eduardo

 

Many thanks for your help. Very nice and simple....BUT!

 

It gives me an error...maybe beacause i have sales on the same day and the error says something like..." it's not possible to sort the column "MES_MMM" by "MesN". You cannot have more than one value in "MesN" for the same value in "MES_MMM". Choose a different column to sort or refresh data in "MesN".

This happens all in the same table because i've created 2 new columns, or for month number and the other for month name.

Any ideas left?

Many thanks for your help Eduardo

Best regards

Pedro

Hi @BhaveshPatel,

 

  Thanks for clarifying. I took it mistakenly as excel formula.

 

Regards,

BhaveshPatel
Community Champion
Community Champion

Either you can create a new calculated column and use format function or

 

Go to the Query editor, Select the Transform Tab and in the fifth section (Date & Time Column), Select Date drop down , Go to the Month and Select fifth option "Name of Month", Load the Query after you are done.

 

This is easy and just few clicks on the ribbon.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Hi guys

You've help me a lot. Sometimes "i'm sleeping" and can't see the solution right away.

Anyway, i've done this, outside editor:

 

New date = LEFT((´name of the database'[DataCriacao].[Month]);3)

 

Because, what i realy want was only the first 3 letters from the month.

Thanks a lot 

Best regards

Pedro

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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