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
JamesGordon
Helper II
Helper II

Graph months in wrong order

Hi,

 

I am trying to create a graph of YTD sales. The tricky part is our year starts on the 1st of October - if i plot the graph it show January 2020 as the first bar instead of October 2019? I am using the date heirachy as on the X-axis also? The date format is DD/MM/YYYY if that is required also?

 

Can anyone point me in the right direction so the graph starts with Oct 2019, Dec 2019, Jan 2020, Feb 2020 etc etc?

 

 

 

Power Bi ques 6.jpg

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Ah, so if you click on your visual as is, there is the "Expand" button in the tooltips (upper right-hand corner). It looks like an upside down fieldgoal. Click that and then you'll see the additional details.

View solution in original post

8 REPLIES 8
Greg_Deckler
Super User
Super User

Sounds like you need a Sort By column for your Month Date. 


Follow on LinkedIn
@ 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...
Anonymous
Not applicable

Hi @JamesGordon ,

You'll want to format your field as the whole date rather than the date hierarchy.

image.png

From there, you can format the date field to just be Month name, Year or even Month name and it'll work sequentially.

 

- Paul

Thanks Paul,

 

I have chosen to display by Date instead of hierarchy so all in the correct order now- thank you!

I cant see any option to format the date field to just be Month name? I have looked in the format tab as highligted below - or am i looking in the wrong area?

 

Power Bi ques 7.jpg

Anonymous
Not applicable

@JamesGordon 

 

Thinking about it some more, why not just include the year in your original visual (with the full date hierarchy)? If you're doing a YTD calculation, you could always just drop months that =0 or only show the last 12 months.

 

image.png

Hi Paul,

 

This is what the graph produces if i choose year and month - doesnt appear to break it down any further unless i select only "month" but then it arranges the month in the order as per my orginal post?

Power Bi ques 8.jpg

Anonymous
Not applicable

Ah, so if you click on your visual as is, there is the "Expand" button in the tooltips (upper right-hand corner). It looks like an upside down fieldgoal. Click that and then you'll see the additional details.

Ah ha, that worked - Thank you!

 

As a side note - would you know how to calculate these sales to prodice a cumulative month to month graph also?

Anonymous
Not applicable

Haha, no worries!

 

Yeah, you want to have a calculated column where it sums all values less than or equal to the current date. You could even set a "start" point if you only ever wanted the last rolling 12.

 

Here's another solution that does that.

https://community.powerbi.com/t5/Desktop/Cumulative-Total/td-p/43115

Helpful resources

Announcements
Europe Fabric Conference

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.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.