Forum Discussion
% Comparison from Pervious Year and Month Measure
Hi Experts,
I need a help with regards to % Comparison from Pervious Year and Month Measure and both should come from same visual using drill down option.
we can use any dummy data to achieve my graphs
Year Wise Presentation
When i drill down i should view Month Wise View like below
Thanks,
Raghu
3 Replies
- kolturra
Helper IV
Sorry I think I did not give proper communication in my earlier message. We need to create measure for % comparison with previous year and month
Year wise Visual.- Year wise it has values of each year in bar.
- % Comparison with previous year which is line chart - This we have to achieve with measure
Drill Down Visual - Once we click on specific year, we will drill down to Month level.
- Months wise it has values of each month in bar.
- % Comparison with previous month which is line chart - This we have to achieve with measure
My data is in below format
Column 1 - Month - Jan 2020 to Dec 2021
Column 2 - Value - between 100 to 200
Not able to paste table because of some error, if you create this table then my data will be ready
- Fowmy
Super User
kolturra
I created the sample data based on your explanation for the years 2020 to 2022, add a date table to use Time Intelligence functions, created the following single measure to calculate % variance for both year and month level. I also attached the PBIX file for you to learn.vs Previous Period % = var __Curr = [Amount] var __PreYR = CALCULATE( [Amount], DATEADD( Dates[Date] , -1,YEAR) ) var __PreMO = CALCULATE( [Amount], DATEADD( Dates[Date] , -1,MONTH) ) var result = IF( ISFILTERED(Dates[Year-Month]), DIVIDE( __Curr - __PreMO , __PreMO ), DIVIDE( __Curr - __PreYR , __PreYR ) ) return result