Forum Discussion
Anonymous
7 years agoNot applicable
Calculate with a date range?
Hello, I am trying to replicate what a "SUMIFS" forumla would do in excel with a date range. I have 2 main data tables one that has actual promoted sales units and one that has planned promoted ...
- Anonymous7 years ago
I solved this with a "Datesbetween" formula
Actual Promo Units = CALCULATE([Promo Units CY], DATESBETWEEN('Date'[Date],MAX('Trade Plan 2019'[Start Date]),max('Trade Plan 2019'[End Date])))
v-yuta-msft
7 years agoCommunity Support
Anonymous ,
You can modify your measure as below:
result =
CALCULATE (
[Promo Units CY],
FILTER (
'Trade Plan 2019',
'Trade Plan 2019'[Start Date] > RELATED ( 'Date'[Date] )
&& 'Trade Plan 2019'[End Date] < RELATED ( 'Date'[Date] )
)
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous7 years agoNot applicable
v-yuta-msft the formula didn't bring in any values - it's all blank
- Anonymous7 years agoNot applicable
I solved this with a "Datesbetween" formula
Actual Promo Units = CALCULATE([Promo Units CY], DATESBETWEEN('Date'[Date],MAX('Trade Plan 2019'[Start Date]),max('Trade Plan 2019'[End Date])))