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

Need some help! Clustered stacked column chart or any chart.

Hello

 

How can I show multiple years/months of sales history in a bar line graph without Power Bi adding the months together?

 

Like say you want to show a range of actual sales for September 2016-September 2017 in a graph. In Excel the graph's first month would be September 2016 and end September 2017. Power Bi on the other hand only shows 12 columns for the Calendar year and adds any months selected from the previous year to the current year.

 

Here is an example in Excel of how it should be:

 

 

 

 

Capture6.JPG

 

 

Here is how Power Bi organizes the data: It starts to add any months from the previous year together instead of the graph starting from September 2016.

 

Does anyone know how to solve this?

 

 

Capture.JPG

 

Thanks

 

Kyle

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @shiner1,

 

Supposing you have a calendar table to do your dates in your visuals, add a column with the following code:

Month_Year = FORMAT('Calendar'[Date];"mm/yyyy")

Then use this column for your x-axis , if you want to have it on the first day of the month just change the formula to:

Month_Year = FORMAT('Calendar'[Date];"1/mm/yyyy")

(European format if needed as you have it in your chart just change the order of day/month)

Regards,

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
shiner1
Frequent Visitor

How do I sort the months in Calendar year format instead of A-Z or Z-A? Like: Jan, Feb, Mar, April, May, June, July, Aug, Sept, Oct...

 

Thanks,

 

Kyle

MFelix
Super User
Super User

Hi @shiner1,

 

Supposing you have a calendar table to do your dates in your visuals, add a column with the following code:

Month_Year = FORMAT('Calendar'[Date];"mm/yyyy")

Then use this column for your x-axis , if you want to have it on the first day of the month just change the formula to:

Month_Year = FORMAT('Calendar'[Date];"1/mm/yyyy")

(European format if needed as you have it in your chart just change the order of day/month)

Regards,

MFelix

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



This is how it looks now: I would like to see it in Calendar order not ABC order which is what it's in now. Does anyone know how to do this?


Any help is greatly appreciated. Thanks

 

Capture8.JPG

Thanks!

 

How do I sort the months in Calendar year format instead of A-Z or Z-A? Like: Jan, Feb, Mar, April, May, June, July, Aug, Sept, Oct...

 

Thanks,

 

Kyle

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.