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

Year Over Year by Month

Hello Masters!

 

This should be simple. I have two measures  [Forklift New Sales 2016] which sums the 2016 FY GP and [Forklift New Sales 2017] which sums the 2017 FY GP.

 

I have a Date Table:

Dates = CALENDARAUTO()

Month = FORMAT('Dates'[Date],"MMMM YYYY")

Month ID = 0 -INT(FORMAT('Dates'[Date],"YYYYMM"))

Year = YEAR('Dates'[Date])

 

So I just take the Date table and relate it to the invoice date on my Sales data and I get this. Nice... but I want the graph to compare the data monthy. November 2015 next to November 2016, January 2016 to January 17.

 

 

GP F1.png

 

 

By messing with some of the drill down settings. I can get it to look like this... but it's not in the correct order. November 2015 has to be first and so on.

 

 

gp f2.png

 

 

Please let me know if you need anything else!

 

 

 

 

 

5 REPLIES 5
v-sihou-msft
Employee
Employee

@JCBI1023

 

In your scenario, your first chart is taking the general calendar, as your data is started from Nov 2015. If you analysis on Month Name level (ignoring Year), like your second chart, it will take the general calendar sort for month number, that's the reason why it started from Jan. 

 

For your requirement, you need to create the "custom sort" column to make Nov as the first. It can be like: 

 

custom sort =
IF (
    'Table'[Month Number] >= 11,
    'Table'[Month Number] - 10,
    'Table'[Month Number] + 2
)

Then make the Month Name column "Sort By" above column. 

 

23.PNG

 

Regards,

Hello @v-sihou-msft,

 

Your column name in the picture says "month name" but your custom sort column says "month number". Do I have to create a customer month number column? How would that work? I created a custom month name column like you did:

 

Month Name = FORMAT ('Dates'[Date],"MMM")

 

 

@JCBI1023

 

Yes, you should have a Month Number column. You can just use MONTH() function on a Date column to get the month number. 

 

Regards,

I just cannot figure out how to get the month number column. 

 

11-20-2017 11-48-50 AM.png

@v-sihou-msft

 

Would I still be using Date > Month as my Axis? I am still getting January as the first month.

 

Custom Sortpng.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.