Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi i have a data which will be refreshed timely
| Tuition | account | Year |
| 50 | texas | 2020-2021 |
| 100 | texas | 2021-2022 |
| 150 | texas | 2022-2023 |
| 200 | penstate | 2023-2024 |
| 250 | penstate | 2024-2025 |
| 300 | perdue | 2025-2026 |
| 350 | perdue | 2026-2027 |
| 400 | perdue | 2027-2028 |
i want to calculate the year on year change in Tuition Fee based on the Account
i tried to create a date table but it didnt work
Currently trying with this DAX Formula
Solved! Go to Solution.
Hi @gopu99 ,
You can update the formula of measure [YoY Growth] as below, and check if that is what you want.
YoY Growth =
VAR _selaccount =
SELECTEDVALUE ( 'Sheet1'[account] )
VAR _selyear =
SELECTEDVALUE ( 'Sheet1'[Year] )
VAR CurrentYearFee =
SUM ( Sheet1[Tuition] )
VAR _preyear =
CALCULATE (
MAX ( Sheet1[Year] ),
FILTER (
ALLSELECTED ( Sheet1 ),
'Sheet1'[account] = _selaccount
&& 'Sheet1'[Year] < _selyear
)
)
VAR PreviousYearFee =
CALCULATE (
SUM ( Sheet1[Tuition] ),
FILTER (
ALLSELECTED ( Sheet1 ),
'Sheet1'[account] = _selaccount
&& 'Sheet1'[Year] =_preyear
)
)
RETURN
IF (
ISBLANK ( PreviousYearFee ),
BLANK (),
( CurrentYearFee - PreviousYearFee ) / PreviousYearFee
)
Best Regards
Hi @gopu99 ,
You can update the formula of measure [YoY Growth] as below, and check if that is what you want.
YoY Growth =
VAR _selaccount =
SELECTEDVALUE ( 'Sheet1'[account] )
VAR _selyear =
SELECTEDVALUE ( 'Sheet1'[Year] )
VAR CurrentYearFee =
SUM ( Sheet1[Tuition] )
VAR _preyear =
CALCULATE (
MAX ( Sheet1[Year] ),
FILTER (
ALLSELECTED ( Sheet1 ),
'Sheet1'[account] = _selaccount
&& 'Sheet1'[Year] < _selyear
)
)
VAR PreviousYearFee =
CALCULATE (
SUM ( Sheet1[Tuition] ),
FILTER (
ALLSELECTED ( Sheet1 ),
'Sheet1'[account] = _selaccount
&& 'Sheet1'[Year] =_preyear
)
)
RETURN
IF (
ISBLANK ( PreviousYearFee ),
BLANK (),
( CurrentYearFee - PreviousYearFee ) / PreviousYearFee
)
Best Regards
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 30 | |
| 23 |