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
Aman
New Member

Last year Dec month coming in this year Dec Month

Hi,

 

I am trying to show data from last year dec  month till April in report but while creating graph its is showing in this years data  in axis.

Could you please help me in how i could show data like dec jan feb... in graph.

 

1 ACCEPTED SOLUTION

Assuming you have a year field and month number field, simply create a calculated column:

 

[Year] * 100 + [Month]

 

This will give values like 201612 etc.

 

Another option is to use the full date in your axis but use the automatic hierachy (or create your own) so that a user can drill down into year, quarter, month, etc. or expand all levels and see the order you have described.  If you are using a normal calendar year then the auto hierarchy should be sufficient.  Otherwise, you should create a date table that takes the full dates and has additional fields for year, quarter, month, etc. and then build your own hierarchy in the visual by simply dragging one field after another, in order, to the axis of the chart.

View solution in original post

6 REPLIES 6
Aman
New Member

image.png

Can you please clarify what you are trying to do?  You don't want to see December?  You want December before January?

I want to see data like dec jan feb .

As dec is 2016 data and jan,feb is of 2017

I think you are going to need a fully qualified month-year type of field for your axis.  Power BI will not know to put "December" before "January" if you are putting month name in the axis and you have a sort order for Jan = 1 ... December = 12.

 

You will need to create a concatenated value like 201612, 201701 etc. to get the order you want.

As i am new to power BI could you please help me in how i could achive it

Assuming you have a year field and month number field, simply create a calculated column:

 

[Year] * 100 + [Month]

 

This will give values like 201612 etc.

 

Another option is to use the full date in your axis but use the automatic hierachy (or create your own) so that a user can drill down into year, quarter, month, etc. or expand all levels and see the order you have described.  If you are using a normal calendar year then the auto hierarchy should be sufficient.  Otherwise, you should create a date table that takes the full dates and has additional fields for year, quarter, month, etc. and then build your own hierarchy in the visual by simply dragging one field after another, in order, to the axis of the chart.

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.