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
hsalim
Regular Visitor

Reporting Sales Revenue last year and this year on a single graph

Hi Everyone, firstly many thanks for making the time in helping me with my enquiry

I have two columns of sales revenue which look at 2019 and 2020 sales respectively.

I want to be able to display these on a single XY graph. One line which shows the performance in 2019 and another line that shows 2020.

So far this is what I’ve been able to produce:

 

hsalim_0-1613316884136.png

 

 

 

As you can see it’s not exactly what I had in mind. If anyone can point me in the right direction, that would be amazing, thank you.

Lastly, is it true that when working with dates, it’s always beneficial to use the calender function as one of the first things to do when working with time analysis?

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@hsalim it should be pretty simple, you should have the month name and year column in your model. You should add a date dimension in your model, read my post here. Once you have the date dimension in your model, put the month name on the x-axis and year on legend and revenue on values, and you will get the requird result. if it still doesn't work for you, It will be easier if you share pbix file using one drive/google drive with the expected output. Remove any sensitive information before sharing.

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts 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.

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@hsalim it should be pretty simple, you should have the month name and year column in your model. You should add a date dimension in your model, read my post here. Once you have the date dimension in your model, put the month name on the x-axis and year on legend and revenue on values, and you will get the requird result. if it still doesn't work for you, It will be easier if you share pbix file using one drive/google drive with the expected output. Remove any sensitive information before sharing.

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts 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.

You're a star, thank you so much, i'm thrilled 😀

One baby step closer towards DAX and Power BI

Ashish_Mathur
Super User
Super User

Hi,

I will be able to help you a lot more if you share your data (in a format that can be pasted in an MS Excel file). 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish, you're super kind, many thanks.

I will get in touch 🙂

parry2k
Super User
Super User

@hsalim for time intelligence yes always use calendar table, it is a best practice. not sure what you want to do here, do you want to show sales trends by month and different want to show different colors for each year, is this what you are trying to achieve?



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.

Hi Parry, thank you for expertise on time intelligence.

I'm after a single graph with two lines starting from January to December.

One line which presents 2019

Another line which presents 2020

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.