Forum Discussion
Tavi_
2 years agoFrequent Visitor
Cumulative Cartons Forecasted
Hi,
I use this formula for the cumulative total of forecasted cartons.
_Forecast Cartons Cumulative = CALCULATE(
[_Forecast Cartons],
FILTER(
ALL('[DIM] Date'[Date]),
'[DIM] Date'[Date] <= MAX ('[DIM] Date'[Date]))
)
But how do I adjust the formula so the formula starts counting from today? So my figures will look like this
Tavi_ OK, didn't understand that from the original post:
_Forecast Cartons Cumulative = VAR __Value = CALCULATE( [_Forecast Cartons], FILTER( ALL('[DIM] Date'[Date]), '[DIM] Date'[Date] <= MAX ('[DIM] Date'[Date]) && '[DIM] Date'[Date] >= TODAY() ) ) VAR __Result = IF( MAX('[DIM] Date'[Date]) < TODAY(), BLANK(), __Value ) RETURN __Result
4 Replies
- Greg_DecklerCommunity Champion
_Forecast Cartons Cumulative = VAR __Value = CALCULATE( [_Forecast Cartons], FILTER( ALL('[DIM] Date'[Date]), '[DIM] Date'[Date] <= MAX ('[DIM] Date'[Date])) ) VAR __Result = IF( MAX('[DIM] Date'[Date]) < TODAY(), BLANK(), __Value ) RETURN __Result - Khushidesai0109Skilled Sharer
Hii You can use this DAX Instead
Forecast Cartons Cumulative =
CALCULATE (
[_Forecast Cartons],
FILTER (
ALLSELECTED ( '[DIM] Date'[Date] ),
'[DIM] Date'[Date] <= MAX ( '[DIM] Date'[Date] )
)
)If this solution helped you please give a thumbs up and accept this reply as a solution!!
Thank You!! Regards!! - Tavi_Frequent Visitor
Khushidesai0109 your formula shows me this figures
Greg_Deckler your formula shows me this figures
Both not the figures I'm looking for. De formula must ignore al the cartons before today.
- Greg_DecklerCommunity Champion
Tavi_ OK, didn't understand that from the original post:
_Forecast Cartons Cumulative = VAR __Value = CALCULATE( [_Forecast Cartons], FILTER( ALL('[DIM] Date'[Date]), '[DIM] Date'[Date] <= MAX ('[DIM] Date'[Date]) && '[DIM] Date'[Date] >= TODAY() ) ) VAR __Result = IF( MAX('[DIM] Date'[Date]) < TODAY(), BLANK(), __Value ) RETURN __Result