Forum Discussion
YoY Growth Card
- 1 year ago
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 outputYoY_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 ) )
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