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
Greg_Deckler
4 years agoCommunity Champion
renlaforest Basically a Running Total measure (there is a Quick Measure for this) but in column form:
ENTargetToDate column =
VAR __Project = 'Table'[Project] //assumes you have a project column in your tracking table
VAR __DailyENTarget = MAXX(FILTER('Projects',[Project] = __Project),[DailyENTarget)
VAR __Date = [Date]
VAR __Days = COUNTROWS(FILTER(ALL('Table'),[Date] <= __Date))
RETURN
__Days * __DailyENTarget
renlaforest
4 years agoHelper I