Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply

Showing Continuous Years on a Chart

Good Morning,

 

I have had a request from a client to display a line chart with three years worth of data on it, that is displayed in a continous line. So as one year ends, the next one starts. It also needs to be controlled by filter selection, so if you selected the financial year of 2020-21, then it would need to show the two previous years. 

 

I have been looking around the forums and youtube videos but cant seem to find a method that works for me. If you can offer any assistance, I would be very grateful.

 

Have a good day.

RB

 

2 ACCEPTED SOLUTIONS

Hi @richardburling  :
You should create a calendar table that will be related to the transactions table  like : 

Ritaf1983_0-1703067700004.png

The tutorial for creating a calendar is here :

https://www.youtube.com/watch?v=Lt_nNLQz0IE

Then on slicer put a year from the calendar table: 

Ritaf1983_1-1703067877038.png

Use the needed granularity as a hierarchy of the graph  (X-axis from date table again):

Ritaf1983_2-1703067951110.png

PBIX is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

@richardburling 
You can use dax to manipulate the years.

please refer to the linked discussion:

https://community.fabric.microsoft.com/t5/Desktop/Show-last-two-years-of-selected-year/m-p/1586070#M...

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

6 REPLIES 6
Ritaf1983
Super User
Super User

Hi @richardburling 
Do you mean something like that ?

Ritaf1983_0-1703066564327.png

if not please show a screenshot of the desired result.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

That's it!! Only my data is based on 52 weeks rather than 12 months but thats it. 

 

Can you please point to where I can find out how to build this type of chart? 

Hi @richardburling  :
You should create a calendar table that will be related to the transactions table  like : 

Ritaf1983_0-1703067700004.png

The tutorial for creating a calendar is here :

https://www.youtube.com/watch?v=Lt_nNLQz0IE

Then on slicer put a year from the calendar table: 

Ritaf1983_1-1703067877038.png

Use the needed granularity as a hierarchy of the graph  (X-axis from date table again):

Ritaf1983_2-1703067951110.png

PBIX is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi, 

Thanks for this.

 

It seems that you have multi-selected the years to show the data on the chart. The client has requested that they only select one year and the historical years show automatically. This is where I am stumped with this. 

@richardburling 
You can use dax to manipulate the years.

please refer to the linked discussion:

https://community.fabric.microsoft.com/t5/Desktop/Show-last-two-years-of-selected-year/m-p/1586070#M...

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks @Ritaf1983 for your help. I am not sure I will be able to use a disconnected Year table as there is already a DIM_Calendar table that the report is connected to and this is coming directly from an Oracle database. The report is already being filtered using the DIM_Calendar table so I am worried we may get some confusion. However, this will be useful for future reports. Thanks again.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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