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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello I'm new to DAX Syntaxe and I want to create a mesure that calculate the cumulative value of the budget for the years 2021 and 2022 . exemple: budget for date 01/01/2021 :200 and budget for 01/01/2022 : 200 , the result should be cumulative for 01/01/2021: 200 and for 01/01/2022: 400 . By this formula the result is good for the year 2021 but the cumulative value for 2022 is giving a value more than the expected again as I sad the SUM need to be only between the same dates 01/01/2021 goes with 01/01/2022.
The current code That I have used is:
Accumulated =
VAR vCurrentYear = YEAR( MAX( Abfrage1[date] ) )
RETURN
IF(
vCurrentYear = 2022,
CALCULATE(
SUM( Abfrage1[budget] ),
DATESINPERIOD(
'Abfrage1'[Date],
MAX( 'Abfrage1'[Date] ),
-1,
YEAR
)
),
SUM( Abfrage1[budget] )
)
Sorry if i am mis-understanding. But If you have budgets set for each month of 2021 then your measure for 2022 will be the sum of all the budgets in the range. Not just 200+200. But 200+200+200+200+....
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.