cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
liudaburtseva
Frequent Visitor

Compare Two Years

Hi, everyone!

 

I have timeline column with date for two years and column with values.
I need to visualize stacked area chart which will show comparison of values by years. I have set up my visualization as shown on image below:

2.JPG

But I need data to be shown on one timeline one year under another as shown below: 

3.JPG

 

But I need to save Axis as on the first image to show detailed data with hours.

How can I visualize my data as I described?

 

I will be very grateful for your help!  

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @liudaburtseva 

 

Would you like to set another year's values as a measure like below?

Please create a calendar table and manage the measure, reference: 

https://community.powerbi.com/t5/Desktop/Last-year-month-value/m-p/332028 

https://community.powerbi.com/t5/Desktop/This-year-vs-Last-year/m-p/793367 

05.PNG

 

Community Support Team _ Dina Ye
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
v-diye-msft
Community Support
Community Support

Hi @liudaburtseva 

 

Would you like to set another year's values as a measure like below?

Please create a calendar table and manage the measure, reference: 

https://community.powerbi.com/t5/Desktop/Last-year-month-value/m-p/332028 

https://community.powerbi.com/t5/Desktop/This-year-vs-Last-year/m-p/793367 

05.PNG

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

Did not get it completely. But you can create a one year lag measure and plot the the current and this measure togther.

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.

Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors