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
Br1bn
Regular Visitor

Month Abbreviation

Hi, in my data I have two fields YEAR and MONTH that I used to create a new column 

Date = DATE (Data[YEAR],Data[MONTH] ,1)

and setting its data type as Date/time I obtain this:

Br1bn_0-1674509035234.png

which I used to build different graphs., e.g. 

Br1bn_1-1674509121814.png

 

The problem is that I would use the abbreviated month to save space but I cannot find the way, I tried several approached but none of them worked. Could you help me? 

 

1 ACCEPTED SOLUTION

hi @Br1bn 

For chart visuals, you can always add another field to the tooltips and sort with the tooltips field.

e.g. another column like:

MonthNumber= FORMAT ( [Date], "MM" )

like this:

FreemanZ_0-1674520788324.png

 

View solution in original post

7 REPLIES 7
FreemanZ
Super User
Super User

hi @Br1bn 

try to plot the visual with a calculated column like

MMM = FORMAT([Date], "mmm")

or 

MM = FORMAT([Date], "mm")

or 

YY/MM = FORMAT([Date], "yy/mm")

instead of the month hierarchy.

@FreemanZ  The problem is that than the viz is not sorted on month natural order 

Br1bn_0-1674513206957.png

 


😞

hi @Br1bn 

For chart visuals, you can always add another field to the tooltips and sort with the tooltips field.

e.g. another column like:

MonthNumber= FORMAT ( [Date], "MM" )

like this:

FreemanZ_0-1674520788324.png

 

The downside of this solution in that now in the tooltip I have also che MonthNumber field when I go over with the mouse

eliasayy
Impactful Individual
Impactful Individual

Hello @Br1bn  after created the new column of abbrv, go to your tables, 

Create a new sort column

Sorting = format([date],"yyyymm")

Now

Select the added column of abbrv, and press on sort column, and choose the sorting added column

I created a new column:

Month_Sorting = format(Data[Date],"yyyymm")

Then I clicked on the column "Month Short" and then I went to "Column Tools":

Br1bn_1-1674514591342.png

but tring sorting by the "Month Sorting" I got this error message

Br1bn_0-1674514496518.png

 

The sorting is set up staticly on the whole table, not in the context of your visual.  The problem is that there are multiple values of month_sorting for each Month

 

e.g. for June, Jun corresponds to 202206 and 202106.  When there are similar multiple values for the other months, it doesn't know how to perform the sort.

 

Either use Format(..., "MMM") for short month and Format(...,"mm") as your month_sorting
and always have a year filter in effect where it is used

or
use Format(..., "MMM yyyy") for short month and Format (..., "yyyymm") as your month_sorting but this will change your display output.

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.

Top Solution Authors