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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.