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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Trying2Excel
Helper I
Helper I

YoY Growth % DAX Formula

I need help with creating a YoY growth rate for the table below. Below I have also provide my YTD reduction formula.

 

Trying2Excel_0-1743080672991.png

 
 
YTD Total Complete Reductions =
VAR _currentYear =
    YEAR ( MAX ( 'Historical Reductions Table'[End of Month] ) )
VAR _currentMonth =
    MONTH ( MAX ( 'Historical Reductions Table'[End of Month] ) )
RETURN
    IF (
        ISINSCOPE ( 'Historical Reductions Table'[End of Month].[Year]),
        CALCULATE (
            SUM ( 'Historical Reductions Table'[Reduction2] ),
            FILTER (
                ALLSELECTED ('Historical Reductions Table'),
                YEAR ( 'Historical Reductions Table'[End of Month]) = _currentYear
                    && MONTH ( 'Historical Reductions Table'[End of Month] ) <= _currentMonth
            )
        ),
        CALCULATE (
            SUM ( 'Historical Reductions Table'[Reduction2] ),
            FILTER (
                ALLSELECTED ('Historical Reductions Table' ),
                MONTH ( 'Historical Reductions Table'[Date] ) <= _currentMonth
            )
        )
    )

 

1 ACCEPTED SOLUTION
v-hashadapu
Community Support
Community Support

Hi @Trying2Excel , Thank you for reaching out to the Microsoft Community Forum.

 

Try below:

YoY Growth Rate =

VAR _currentYear = SELECTEDVALUE('Historical Reductions Table'[End of Month].[Year])

VAR _previousYear = _currentYear - 1

VAR _currentMonth = MONTH(MAX('Historical Reductions Table'[End of Month]))

 

VAR _currentYearReduction =

    CALCULATE(

        SUM('Historical Reductions Table'[Reduction2]),

        FILTER(

            ALLSELECTED('Historical Reductions Table'),

            YEAR('Historical Reductions Table'[End of Month]) = _currentYear

            && MONTH('Historical Reductions Table'[End of Month]) <= _currentMonth

        )

    )

 

VAR _previousYearReduction =

    CALCULATE(

        SUM('Historical Reductions Table'[Reduction2]),

        FILTER(

            ALLSELECTED('Historical Reductions Table'),

            YEAR('Historical Reductions Table'[End of Month]) = _previousYear

            && MONTH('Historical Reductions Table'[End of Month]) <= _currentMonth

        )

    )

 

RETURN

    IF(

        ISBLANK(_previousYearReduction) || _previousYearReduction = 0,

        BLANK(),

        DIVIDE(_currentYearReduction - _previousYearReduction, _previousYearReduction)

    )

 

If your End of Month column has a date hierarchy, you can replace YEAR('Historical Reductions Table'[End of Month]) with 'Historical Reductions Table'[End of Month].[Year]' and similarly for MONTH

 

If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

View solution in original post

5 REPLIES 5
v-hashadapu
Community Support
Community Support

Hi @Trying2Excel , Thank you for reaching out to the Microsoft Community Forum.

 

Try below:

YoY Growth Rate =

VAR _currentYear = SELECTEDVALUE('Historical Reductions Table'[End of Month].[Year])

VAR _previousYear = _currentYear - 1

VAR _currentMonth = MONTH(MAX('Historical Reductions Table'[End of Month]))

 

VAR _currentYearReduction =

    CALCULATE(

        SUM('Historical Reductions Table'[Reduction2]),

        FILTER(

            ALLSELECTED('Historical Reductions Table'),

            YEAR('Historical Reductions Table'[End of Month]) = _currentYear

            && MONTH('Historical Reductions Table'[End of Month]) <= _currentMonth

        )

    )

 

VAR _previousYearReduction =

    CALCULATE(

        SUM('Historical Reductions Table'[Reduction2]),

        FILTER(

            ALLSELECTED('Historical Reductions Table'),

            YEAR('Historical Reductions Table'[End of Month]) = _previousYear

            && MONTH('Historical Reductions Table'[End of Month]) <= _currentMonth

        )

    )

 

RETURN

    IF(

        ISBLANK(_previousYearReduction) || _previousYearReduction = 0,

        BLANK(),

        DIVIDE(_currentYearReduction - _previousYearReduction, _previousYearReduction)

    )

 

If your End of Month column has a date hierarchy, you can replace YEAR('Historical Reductions Table'[End of Month]) with 'Historical Reductions Table'[End of Month].[Year]' and similarly for MONTH

 

If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

Thank you so much for your help!

Pow3Range
Frequent Visitor

@Trying2Excel   -- Can You share the PBIX file if possible 

Pow3Range
Frequent Visitor

YoY Growth % =
VAR _currentYear =
YEAR ( MAX ( 'Historical Reductions Table'[End of Month] ) )
VAR _currentMonth =
MONTH ( MAX ( 'Historical Reductions Table'[End of Month] ) )

VAR _currentYTD =
CALCULATE (
SUM ( 'Historical Reductions Table'[Reduction2] ),
FILTER (
ALLSELECTED ( 'Historical Reductions Table' ),
YEAR ( 'Historical Reductions Table'[End of Month] ) = _currentYear
&& MONTH ( 'Historical Reductions Table'[End of Month] ) <= _currentMonth
)
)

VAR _previousYTD =
CALCULATE (
SUM ( 'Historical Reductions Table'[Reduction2] ),
FILTER (
ALLSELECTED ( 'Historical Reductions Table' ),
YEAR ( 'Historical Reductions Table'[End of Month] ) = _currentYear - 1
&& MONTH ( 'Historical Reductions Table'[End of Month] ) <= _currentMonth
)
)

RETURN
IF (
NOT ISBLANK(_previousYTD),
(_currentYTD - _previousYTD) / _previousYTD,
BLANK()
)

Modified your DAX Can you try this one @Trying2Excel   || And if possible can you share your PBIX File?
If this solution helps, please accept it and give a kudos, it would be greatly appreciated.

Thank you for the quick response! The formula provided doesnt seem to be recognizing the year in the table.

Trying2Excel_0-1743082892550.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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