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

last year's months mixed with this year's months in monthly sales chart

Hi!

I've been having a problem with an analysis of sales by month, if you look at the image the last three months
(october, november and december/ the store opened october last year) this are along with january to august months of this year,
how can i separate these months by year on this visual? avoiding show the last months of 2021 on 2022 analisys?Sales graph by monthSales graph by monthHow datetime is storedHow datetime is stored

 

/year filter works, the problem is in charts with all months of the year

1 ACCEPTED SOLUTION
Henrykong_
Resolver I
Resolver I

Hi @Thiago_Melo ,

 

Can be grouped by custom fields, current year + month. Try like below:

new_date = YEAR(test[Date]) & "-" &MONTH(test[Date])

Henrykong__0-1660120409317.png

 


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

2 REPLIES 2
Henrykong_
Resolver I
Resolver I

Hi @Thiago_Melo ,

 

Can be grouped by custom fields, current year + month. Try like below:

new_date = YEAR(test[Date]) & "-" &MONTH(test[Date])

Henrykong__0-1660120409317.png

 


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@Thiago_Melo there are a few ways to do this, put the Year column on legends or create another column in your table called YearMonth and then create the value which is made of Year + month and then use this new column on the x-axis. 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.