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
dwel0120
Helper III
Helper III

Remove Year from line chart and only include the Month

I want to remove the year from my line chart and only include the month. I have a custom sort on the month because I want it to show July 1 through June 30. If I try the date hierarchy to only show month, I can't get it to do a custom sort. I have also tried creating a new column with the format mmm and placing that into the line chart and it still doesn't work. It still shows the year. Help please!

 

dwel0120_0-1628187589392.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@dwel0120 , You can have column like 

 

 

Month = FORMAT([Date],"mmm")
Month sort = if(month([Date])>6, month([Date]) -6 , month([Date]) +6)

 

Sort month on Month Sort column.

 

But that will not work across year.

 

For that have two column on axis Year and month , Sort  on them uncheck concatenate label, if need sort again

 

Concat 1.pngConcat Label Off.pngConcat2.png

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @dwel0120 ,

You could try the below  solutions:

Solution1:

Based on table ,create a new column:

 

month = FORMAT('table'[Date],"MMMM")
yearmon = FORMAT('table'[Date],"YYYYMM")

 

 

vluwangmsft_0-1629797756504.png

Then click month then sort by the new column:

vluwangmsft_1-1629797777619.png

Final create visual ,you will get you want:

vluwangmsft_2-1629797856026.png

 

 

 

Solution 2:

 

 

 

month = FORMAT('table'[Date],"MMMM")

 

 

Create a sort table :

vluwangmsft_0-1628675548706.png

then sort by index:

vluwangmsft_1-1628675567172.png

Create relationship:

vluwangmsft_2-1628675590608.png

Based on two table ,create visual :

vluwangmsft_3-1628675625580.png

 

refer:https://community.powerbi.com/t5/Desktop/Data-sorted-by-Month-Number-but-Month-Name-is-still-showing... 

Wish it is helpful for you!

 

 

Best Regards

Lucien

amitchandak
Super User
Super User

@dwel0120 , You can have column like 

 

 

Month = FORMAT([Date],"mmm")
Month sort = if(month([Date])>6, month([Date]) -6 , month([Date]) +6)

 

Sort month on Month Sort column.

 

But that will not work across year.

 

For that have two column on axis Year and month , Sort  on them uncheck concatenate label, if need sort again

 

Concat 1.pngConcat Label Off.pngConcat2.png

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.