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
austinsonger
Frequent Visitor

Column Chart - Past 6 Months

How would I go about showing the past 6 months on a column chart (on the X-Axis).

So if I want to show the previous 6 months from April I want it to appear as the following

 

Nov > Dec > Jan > Feb > Mar> April

1 ACCEPTED SOLUTION

@austinsonger 

You should have a date column put on the x-axis. The Dec and Nov you meant should be 2019 Nov and 2019 Dec.

Btw, You can just share a sample of your table, so I could help you with a definite solution.

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
  

View solution in original post

6 REPLIES 6
V-pazhen-msft
Community Support
Community Support

@austinsonger 

 

Usually you can create this measure and put the Measure in the Values of the chart, and put the Date in the Axis. I assumed you want the value of pass 6 months from today. 

 

Measure = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Date]<=TODAY()&&[Date]>=TODAY()-180))

 

 

Read this post to describe your sample:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Where am I going to get into that? As you can see below, I want December and Novem to come before January.

2020-05-05 12_24_20-WPD - Power BI Desktop.png

@austinsonger 

You should have a date column put on the x-axis. The Dec and Nov you meant should be 2019 Nov and 2019 Dec.

Btw, You can just share a sample of your table, so I could help you with a definite solution.

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
  

I don't understand what you mean?

 

 

@austinsonger 

Sorry for confusion, Power bi automatically rankx month from Jan to Dec, you need to include the Year of the date in the axis. See example, you leave Year and Month in the hierarchy, click the blue make to the bottom level.

 

month order.JPG

 


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Greg_Deckler
Super User
Super User

So, this would depend on the data. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

But, you would generally create a measure that would calculate the number of months back from a chosen month and then use that as a filter on your visual. If the answer seems vague, see link above.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.