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
e175429
Helper IV
Helper IV

Calculating % Change from Previous Year

Hello all,

 

This is my current table:

e175429_1-1737739061952.png

 

I would like to add a column that shows the % change from previous year for each section.

Currently, I have no measures created.

 

This is my data:

e175429_0-1737738991854.png

 

I would upload the BI file but you have to be a SuperUser to do that.

 

Any help in pointing me in the right direction would be greatly appreciated.

 

Regards!

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@e175429,

 

Try these measures:

 

Total Served = SUM ( 'Table'[Total Served] )
Percent Change from PY =
VAR vCY =
    MAX ( 'Table'[Year] )
VAR vCYAmount = [Total Served]
VAR vPYAmount =
    CALCULATE ( [Total Served], 'Table'[Year] = vCY - 1 )
VAR vResult =
    IF (
        HASONEVALUE ( 'Table'[Year] ),
        DIVIDE ( vCYAmount - vPYAmount, vPYAmount )
    )
RETURN
    vResult

 

DataInsights_0-1737746821248.png

 

For future reference, you can copy your data and paste using the Table icon rather than a screenshot.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
govind_021
Super User
Super User

Hey @e175429 
Please use below dax formula

YoY % =
VAR CurrentYear = MAX('Sales'[Year])
VAR PreviousYear = CurrentYear - 1

VAR CurrentYearSales =
CALCULATE(
SUM('Sales'[Sales Amount]),
'Sales'[Year] = CurrentYear
)

VAR PreviousYearSales =
CALCULATE(
SUM('Sales'[Sales Amount]),
'Sales'[Year] = PreviousYear
)

RETURN
IF(
NOT ISBLANK(PreviousYearSales),
DIVIDE(CurrentYearSales - PreviousYearSales, PreviousYearSales, 0),
BLANK()
)

Regards
Govind Sapkade ( Data Analyst , Power BI PL 300 Certified , MS Fabric Enthusiast )
Linkdin : www.linkedin.com/in/govind-sapkade-845104225
Youtube : http://www.youtube.com/@govind_dataanalyst


Your solution worked as well. Thank you kindly

DataInsights
Super User
Super User

@e175429,

 

Try these measures:

 

Total Served = SUM ( 'Table'[Total Served] )
Percent Change from PY =
VAR vCY =
    MAX ( 'Table'[Year] )
VAR vCYAmount = [Total Served]
VAR vPYAmount =
    CALCULATE ( [Total Served], 'Table'[Year] = vCY - 1 )
VAR vResult =
    IF (
        HASONEVALUE ( 'Table'[Year] ),
        DIVIDE ( vCYAmount - vPYAmount, vPYAmount )
    )
RETURN
    vResult

 

DataInsights_0-1737746821248.png

 

For future reference, you can copy your data and paste using the Table icon rather than a screenshot.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you very much

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.