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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

comparing two time periods on a single visual

Hi I am trying to compare two time periods in the same visual on Power BI (eg. 31/12/2015-31/12/2018 vs 31/12/2019-31/12/2022).

I would like to replicate these types of charts (note it's a growth rate):

Untitled.png

I found the following post which sounds helpful:

https://www.sqlbi.com/articles/filtering-and-comparing-different-time-periods-with-power-bi/

This is how my model looks:

 

Untitled 2.png

 

However it's not working.

1) When I link 'Period' table with 'Previous Period' table I lose data hierarchy in 'Period' table so all the analysis I built before are no longer working.

 

2) I get an error when I try to create 'Previous Level YoY%' in DF_ANNUAL

 

Any suggestions?

 

Thanks

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Please refer, if this can help. There are two ways. For the second one, the link is given in the article

https://medium.com/chandakamit/power-bi-comparing-data-across-date-ranges-36be49b68613

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

Please refer, if this can help. There are two ways. For the second one, the link is given in the article

https://medium.com/chandakamit/power-bi-comparing-data-across-date-ranges-36be49b68613

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak thank you! in the end this solution worked well!

PaulDBrown
Community Champion
Community Champion

@Anonymous 

It sounds like the second period table should be unlinked. Ie independent from any tables. 

You create new measures which calculate the output based on the dates selected in the second date table and include a slicer from the second date table. You may have to include an ALL(first date table) filter in your second measures to remove filters from the first date table in the calculations.

Sorry if I can’t be more specific but I’m not in front of a PC to check things out.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

@PaulDBrown thank you for your suggestion! In the end I made this following the link that ChandakAmit sent 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.