Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Power Bi Community,
I need your support on writting DAX commend.
I've a table that consist of project ID and Turnover over the years.
| Project ID | Turnover MEUR | Year |
| ID99 | 0,1 | 2021 |
| ID98 | 0,5 | 2021 |
| ID99 | 0,3 | 2022 |
| ID98 | 0,7 | 2022 |
| ID99 | 0,5 | 2023 |
| ID98 | 0,9 | 2023 |
I'd like to subtract turnover over years, in order to be able calculate the growh. In other words,
Growth = Turnover 2022 (ID99) - Turnover 2021 (ID99), Turnover 2023 (ID99) - Turnover 2022 (ID99), Turnover 2022 (ID98) - Turnover 2021 (ID98) ...etc.
Any ideas, how I can write this in DAX command ?
Solved! Go to Solution.
Hi @Anonymous
Please refer to the sample with the solution https://www.dropbox.com/t/80L2KufXOL8k8xLc
Turnover YOY =
VAR CurrentYer = SELECTEDVALUE ( Turnover[Year] )
VAR FirstSelectedYear = CALCULATE ( MIN ( Turnover[Year] ), ALLSELECTED ( Turnover ) )
VAR CurrentValue = SUM ( Turnover[Turnover MEUR] )
VAR PreviousValue = CALCULATE ( SUM ( Turnover[Turnover MEUR] ), Turnover[Year] = CurrentYer - 1 )
RETURN
IF (
CurrentYer <> FirstSelectedYear,
CurrentValue - PreviousValue
)
Hi @Anonymous
Please refer to the sample with the solution https://www.dropbox.com/t/80L2KufXOL8k8xLc
Turnover YOY =
VAR CurrentYer = SELECTEDVALUE ( Turnover[Year] )
VAR FirstSelectedYear = CALCULATE ( MIN ( Turnover[Year] ), ALLSELECTED ( Turnover ) )
VAR CurrentValue = SUM ( Turnover[Turnover MEUR] )
VAR PreviousValue = CALCULATE ( SUM ( Turnover[Turnover MEUR] ), Turnover[Year] = CurrentYer - 1 )
RETURN
IF (
CurrentYer <> FirstSelectedYear,
CurrentValue - PreviousValue
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |