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

Measured with percentage change

I am trying to calculate in percentage the variation of two values ​​between this year and last year.

Last year's value in February:

2020 value = CALCULATE(SUM(Estoque[QTD]),DATESBETWEEN(Estoque[D1].[Date],DATE(2020,02,01),DATE(2020,02,28)))+0

Current year's value in February:

2021 value = CALCULATE(SUM(Estoque[QTD]),DATESBETWEEN(Estoque[D1].[Date],DATE(2021,02,01),DATE(2021,02,28)))+0

 

To calculate the variation I do:

%variation = DIVIDE(Estoque[2021 value]-Estoque[2020 value],Estoque[2020 value])+0

 

The measures from last year and from that year return values, but the variation in% is incorrect. Would anyone have any suggestions?

2 REPLIES 2
Anonymous
Not applicable

I already changed the DIVIDE() parameter, thanks.

 

My YoY% formula returns the correct result.

 

I don't know what could it be to return the percentage 0,00%.

lbendlin
Super User
Super User

Note that DIVIDE() has an "or else"  option, so there is no need for your "+0"  shenanigans.

 

Your YoY% formula looks accurate. Have you verified that your values for the years return the correct result?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.