Forum Discussion
Anonymous
4 years agoNot applicable
Sum last value filtered by date
Hello, I need to get the last CUMULATIF value for each single NO_PALETTE filterd by the choosen date. The date slicer is coming from a calendar table. Then I want to sum all the value the get the to...
- Anonymous4 years ago
Anonymous Your measures needs to sum up the across all distinct values of NO_PALETTE, like this:
Qty(filter)_test = SUMX( VALUES(HIST_PAL[NO_PALETTE]), var dateselect = SELECTEDVALUE(Dimdate[Date]) var minindex = CALCULATE(MIN(HIST_PAL[Index]),HIST_PAL[DATE] <= dateselect,ALLEXCEPT(HIST_PAL,HIST_PAL[NO_PALETTE])) Return CALCULATE(SUM(HIST_PAL[CUMULATIF]),HIST_PAL[Index] = minindex) )
Anonymous
4 years agoNot applicable
Anonymous Your measures needs to sum up the across all distinct values of NO_PALETTE, like this:
Qty(filter)_test =
SUMX(
VALUES(HIST_PAL[NO_PALETTE]),
var dateselect = SELECTEDVALUE(Dimdate[Date])
var minindex = CALCULATE(MIN(HIST_PAL[Index]),HIST_PAL[DATE] <= dateselect,ALLEXCEPT(HIST_PAL,HIST_PAL[NO_PALETTE]))
Return
CALCULATE(SUM(HIST_PAL[CUMULATIF]),HIST_PAL[Index] = minindex)
)Anonymous
4 years agoNot applicable
Thank you Anonymous and CNENFRNL . Your solutions works!