Forum Discussion
renlaforest
4 years agoHelper I
Cumulative Daily Target
Hi - It's embarassing how many hours I've spent trying to figure this out. My Data Model has a table called Project Setup with project in each row. Each project has a column called Start Date, Cl...
- 4 years ago
Hi renlaforest
Here is the sample file with the solution https://we.tl/t-pHo4kYyRleENTargetToDate = VAR CrrentDate = MAX ( EnumDates[Date] ) VAR FirstDateInFilter = CALCULATE ( MIN ( EnumDates[Date] ), ALLSELECTED () ) VAR NumberOfDays = DATEDIFF ( FirstDateInFilter, CrrentDate, DAY ) + 1 VAR ProjectTarget = SELECTEDVALUE ( 'ProjectSetup'[DailyENTarget] ) RETURN ProjectTarget * NumberOfDays
renlaforest
4 years agoHelper I
tamerj1
4 years agoCommunity Champion
renlaforest
Please try this just to see what results you get
ENTargetToDate =
VAR CrrentDate =
MAX ( EnumDates[Date] )
RETURN
CALCULATE (
SUM ( 'ProjectSetup'[DailyENTarget] ),
REMOVEFILTERS (),
EnumDates[Date] <= CrrentDate
)- renlaforest4 years agoHelper I
- tamerj14 years agoCommunity Champion
renlaforest
Ok Then tryENTargetToDate = VAR CrrentDate = MAX ( EnumDates[Date] ) RETURN CALCULATE ( SUM ( 'ProjectSetup'[DailyENTarget] ), REMOVEFILTERS (), VALUES ( EnumDates[Date] ) EnumDates[Date] <= CrrentDate )- renlaforest4 years agoHelper I