Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

DAX Statement for current year only

I have dashboard built off underlying excel spreadsheets which have ytd expenditures and forecasted expenditures future month expenditures.  I have pulled this into a table that also includes 2018 actuals.  I'm trying to create a dax measure that calculates the sum of expenditures only for the current year.  I have the following formula, which works, but I'm prefer it to be dynamic, so next year I don't have to re-write it for the following year's dates

 

[Calculated Expenditures and Forecast] = sum of my expenditures and forecast column

 

2019 Year-End Forecasted Expenditures = CALCULATE([Calculated Expenditures and Forecast], DATESBETWEEN('Expenditure/Forecast and Budget'[Date], date(2019,1,1), date(2019,12,31)))
 
Thanks in advance! 

1 Reply