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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.