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
Anonymous
Not applicable

How to display Month Year instead of Year in X Axis

I have data with Dates, amount value for every date. I tried line graph   but it is showing year not able to show Month year on x axis. I tried new column "Month-Year" and set on x axis but line graph looks change it is not same look as done with Date. It consider sum for months and year. Please let me know how i can fix this

9 REPLIES 9
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Use below formula to convert the Date as a new calculated column:

Month = FORMAT('Date'[Date], "mmmm") & " " & YEAR('Date'[Date])

Then drag it to X-axis:

2.PNG

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Daviejoe
Memorable Member
Memorable Member

If you've created a manual mth-year column and your data on the graph looks strange, it's probably because the graph is sorted/ordered alphabetically.  You will need to create a column that will show the order of the mth-year.

 

Mth Year          Mth Year Index

Jan-19              1

Feb-19             2

Mar-19            3

 

Then in the Modelling section, select the column that you have Mth-Year in and then select the Sort by Column option and then select the Mth Year Index, this will order your Mth Year Index properly.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

thanks for the quick response. I will try that but i need to display "Month -year" in x axis instead of "year"  

If you create a Mth-Year column in your data model and have a Mth-Year index then it'll work fine.

 

Let me know how you get on, happy to help.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

using date field in x axis my graph looks like but it should year. I need show in this format but in x axis display month and year

 

viraj_powerbi_0-1572376046615.png

 

as suggested in this post, i tried doing new columns month-year and month year index , my graph looks like this which is incorrect

 

viraj_powerbi_1-1572376248212.png

 

 

 

 

 

 

Hey, the graph is incorrect as you needed to order the Mth-Year otherwise it orders alphabetically, that's why you see Dec-2017 beside Dec-2018.  I think I've misunderstood what you wanted originally, you still want the intervals to show individually and not rolling them up into a monthly view.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

 I still want the intervals to show individually 

 

You can get this by putting the year and month separately in the Axis, then using the expand down option. See the pics below...      Capture2.PNG     Capture1.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.