Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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):

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:

 

 

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