Forum Discussion
kadapavel
7 years agoHelper II
Rolling total since specific date
Hi, could you please help me to fix my measure.
I would calculate rolling total since one specific date
fatigue_test =
CALCULATE(
SUM('KPI_Indices'[Wearout with min damage]),
FILTER(
ALL(KPI_Indices[ResultDate]),
'KPI_Indices'[ResultDate] <= MAX('KPI_Indices'[ResultDate])))here I have all days selected, but I need to start from [replacement_Date].
BR
Pavel
- Anonymous7 years ago
HI kadapavel ,
You can consider to add a if statement with conditions to compare current date and specific date:
POwer bi DAX = VAR currDate = MAX ( 'Sheet1'[ResultDate] ) VAR selected = 'specific datevalue' RETURN CALCULATE ( SUM ( 'Sheet1'[Result] ), FILTER ( ALL ( Sheet1 ), IF ( currDate < selected, 'Sheet1'[ResultDate] <= currDate, 'Sheet1'[ResultDate] >= selected && 'Sheet1'[ResultDate] <= currdate ) ) )Regards,
Xiaoxin Sheng
6 Replies
- kadapavelHelper II
Hi
[Replacement_date] is a measure
- kadapavelHelper II
Hi, I was not able to attach PBIX file,
here is a snapshot of data, days result and cumulative total. Last column[I want this result] is that what I want and have built with excel. [Power bi DAX] is a measure where I have a challenge.
POwer bi DAX = CALCULATE( SUM('Sheet1'[Result]), FILTER( ALL(Sheet1[ResultDate]), 'Sheet1'[ResultDate] <= MAX('Sheet1'[ResultDate])))BR
Pavel