Forum Discussion
AlexanderAT
7 years agoHelper I
Datesbetween - need help with dax measure
Hello I think what I need is the datesbetween measure, but if you have another suggestion I'll try it. I need to calculate turnover-budget for this year. I don't want it to include the actua...
- 7 years ago
Hi AlexanderAT,
Based on my test, you could refer to below formula:
Measure = CALCULATE ( SUM ( Table1[Turnover. FBP] ), FILTER ( 'Table1', MONTH ( 'Table1'[YearMonthShort] ) < MONTH ( TODAY () ) && YEAR ( 'Table1'[YearMonthShort] ) = YEAR ( TODAY () ) ) ) - CALCULATE ( SUM ( Table1[Budget - FBP] ), FILTER ( 'Table1', MONTH ( 'Table1'[YearMonthShort] ) < MONTH ( TODAY () ) && YEAR ( 'Table1'[YearMonthShort] ) = YEAR ( TODAY () ) ) )Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
v-danhe-msft
7 years agoMicrosoft Employee
Hi AlexanderAT,
Based on my test, you could refer to below formula:
Measure =
CALCULATE (
SUM ( Table1[Turnover. FBP] ),
FILTER (
'Table1',
MONTH ( 'Table1'[YearMonthShort] ) < MONTH ( TODAY () )
&& YEAR ( 'Table1'[YearMonthShort] ) = YEAR ( TODAY () )
)
)
- CALCULATE (
SUM ( Table1[Budget - FBP] ),
FILTER (
'Table1',
MONTH ( 'Table1'[YearMonthShort] ) < MONTH ( TODAY () )
&& YEAR ( 'Table1'[YearMonthShort] ) = YEAR ( TODAY () )
)
)
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
AlexanderAT
7 years agoHelper I
Works perfect. Thank you!