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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
JajatiDev
Helper II
Helper II

YoY Growth Card

Hello,
I have created the measure to calculate yoy growth. 

VAR _CY = [Total Order Volume]
VAR _LY = 
    CALCULATE( 
        [Total Order Volume],
        DATESBETWEEN( 
            Calendar_Table[Date],
            EDATE(MIN(Calendar_Table[Date]), -12),
            EOMONTH(MAX(Consolidated_Order_Book[ReceiveDate]), -12)
        )
    )
VAR _Check = _CY && _LY && HASONEVALUE(Calendar_Table[FY_Year])
VAR _Growth = IF(_Check, DIVIDE(_CY,_LY) -1)

RETURN
    _Growth

 The output is giving me the desired result when presented in a graph or table

JajatiDev_0-1746197013735.png

However, I wish to take this a step forward by presenting the growth rate for the current year in a card dynamically without applying external filters. which I have failed to achieve because the care is returning blank.

Please advise the changes I need to make in the measure to pick the growth rate for FY-25 only.
The financial year in the calculation begins in April and ends in March.


1 ACCEPTED SOLUTION
JajatiDev
Helper II
Helper II

Thank you for all the valuable suggestions.
I was able to work it out.
Included the solution below for everyone's reference.

Also, sharing the screenshot of the card with the final output

JajatiDev_0-1746900485960.png

YoY_OrderFlow% = 
VAR _currentDate = TODAY()
VAR _currentYear = 
        IF( MONTH(_currentDate) >= 4, YEAR(_currentDate) + 1, YEAR( _currentDate))
VAR _currentFY = "FY-" & _currentYear
RETURN 
CALCULATE(
    VAR _cy = [TotalOrderedQuantity]
    VAR _ly_startDate = 
        EDATE( MIN( Calendar_Table[Date]), -12)
    VAR _ly_endDate = 
        EOMONTH( MAX( OrderData[ReceiveDate] ), -12)
    VAR _ly = 
        CALCULATE( 
            [TotalOrderedQuantity],
            DATESBETWEEN( 
                Calendar_Table[Date],
                _ly_startDate,
                _ly_endDate
            ),
            REMOVEFILTERS( Calendar_Table[FY_Year] )
        )
    VAR isValidForGrowth = NOT ISBLANK( _cy ) && NOT ISBLANK( _ly ) && _ly <> 0
    VAR _growth = IF( isValidForGrowth, DIVIDE( _cy, _ly) - 1)
    RETURN
        _growth,
        FILTER( 
            ALL( Calendar_Table[FY_Year] ),
            Calendar_Table[FY_Year] = _currentFY
        )
)

 

View solution in original post

5 REPLIES 5
JajatiDev
Helper II
Helper II

Thank you for all the valuable suggestions.
I was able to work it out.
Included the solution below for everyone's reference.

Also, sharing the screenshot of the card with the final output

JajatiDev_0-1746900485960.png

YoY_OrderFlow% = 
VAR _currentDate = TODAY()
VAR _currentYear = 
        IF( MONTH(_currentDate) >= 4, YEAR(_currentDate) + 1, YEAR( _currentDate))
VAR _currentFY = "FY-" & _currentYear
RETURN 
CALCULATE(
    VAR _cy = [TotalOrderedQuantity]
    VAR _ly_startDate = 
        EDATE( MIN( Calendar_Table[Date]), -12)
    VAR _ly_endDate = 
        EOMONTH( MAX( OrderData[ReceiveDate] ), -12)
    VAR _ly = 
        CALCULATE( 
            [TotalOrderedQuantity],
            DATESBETWEEN( 
                Calendar_Table[Date],
                _ly_startDate,
                _ly_endDate
            ),
            REMOVEFILTERS( Calendar_Table[FY_Year] )
        )
    VAR isValidForGrowth = NOT ISBLANK( _cy ) && NOT ISBLANK( _ly ) && _ly <> 0
    VAR _growth = IF( isValidForGrowth, DIVIDE( _cy, _ly) - 1)
    RETURN
        _growth,
        FILTER( 
            ALL( Calendar_Table[FY_Year] ),
            Calendar_Table[FY_Year] = _currentFY
        )
)

 

v-dineshya
Community Support
Community Support

Hi @JajatiDev ,

Thank you for reaching out to the Microsoft Community Forum.

 

YOY Growth Measure:

YoY Growth Current FY :=
VAR _MaxFY = MAX(Calendar_Table[FY_Year]) or use MAXX(ALL(Calendar_Table), Calendar_Table[FY_Year])
VAR _CY =
CALCULATE(
[Total Order Volume],
Calendar_Table[FY_Year] = _MaxFY
)
VAR _LY =
CALCULATE(
[Total Order Volume],
Calendar_Table[FY_Year] = _MaxFY - 1
)
VAR _HasData = NOT(ISBLANK(_CY)) && NOT(ISBLANK(_LY))
RETURN
IF(_HasData, DIVIDE(_CY, _LY) - 1)

 

Please refer below community threads.

Solved: Re: MTD & %YOY in Card Visual - Microsoft Fabric Community

Solved: How to display year-on-year growth rate - Microsoft Fabric Community

Solved: Need to calculate Year-over-Year Growth for "year"... - Microsoft Fabric Community

 


If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

Thank you

 

Hi @JajatiDev ,

If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

Thank you

bhanu_gautam
Super User
Super User

@JajatiDev 

If you need to dynamically determine the current financial year based on today's date, you can use the following approach:

DAX
VAR CurrentDate = TODAY()
VAR CurrentFY =
IF(
MONTH(CurrentDate) >= 4,
YEAR(CurrentDate) & "/" & YEAR(CurrentDate) + 1,
YEAR(CurrentDate) - 1 & "/" & YEAR(CurrentDate)
)
VAR PreviousFY =
IF(
MONTH(CurrentDate) >= 4,
YEAR(CurrentDate) - 1 & "/" & YEAR(CurrentDate),
YEAR(CurrentDate) - 2 & "/" & YEAR(CurrentDate) - 1
)
VAR _CY =
CALCULATE(
[Total Order Volume],
FILTER(
Calendar_Table,
Calendar_Table[FY_Year] = CurrentFY
)
)
VAR _LY =
CALCULATE(
[Total Order Volume],
FILTER(
Calendar_Table,
Calendar_Table[FY_Year] = PreviousFY
)
)
VAR _Check = _CY && _LY
VAR _Growth = IF(_Check, DIVIDE(_CY, _LY) - 1)

RETURN
_Growth




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






@bhanu_gautam 

Thanks!

I tried your measure; however, the output is not as desired.
I need the measure to be dynamic to project the current year growth/decline only. I'm currently achieving the output by applying the year filter to the visual.
I dont want to put any filters. The dax measure should take care of it. 

JajatiDev_0-1746209338566.png

 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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