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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Comparison of values ​​between different years

Hello everyone,

I would need that, making a comparison of a certain value with the previous year, for the current year count the value up to today's date and do the same thing for the year before (if today is 05 August 2021 I would need that the comparison with the previous year is taken until 05 August 2020 and does not take the values ​​of the whole year - I would need a function that does this without having to set the filter every time). In fact, I would need the date to be adaptive, i.e. every day increases / adapts the comparison without having to do it manually

1 ACCEPTED SOLUTION
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

YTdmeasure= TOTALYTD(SUM(Table[Total Sales]), Table[Dates])

PYTDmeasure= CALCULATE(YTdmeasure, PARALLELPERIOD(Table[Dates], -12, Months))

Comparison= DIVIDE(YTdmeasure-PYTDmeasure, PYTDmeasure)  ........format this to percentage

 

 

I hope this helps!

Mark it as a solution if it answers your que.

Thanks.

View solution in original post

2 REPLIES 2
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @Anonymous ,

YTdmeasure= TOTALYTD(SUM(Table[Total Sales]), Table[Dates])

PYTDmeasure= CALCULATE(YTdmeasure, PARALLELPERIOD(Table[Dates], -12, Months))

Comparison= DIVIDE(YTdmeasure-PYTDmeasure, PYTDmeasure)  ........format this to percentage

 

 

I hope this helps!

Mark it as a solution if it answers your que.

Thanks.

Anonymous
Not applicable

Thank u so much. It's perfect.

 

Have a great day

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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