Forum Discussion
Febin
3 years agoFrequent Visitor
TOTALYTD Giving same value as the source column
Hi, I'm trying to create a simple running total column for the values in "Distance Travelled". My fomula in the column "RunningTotl" is as follows: I'm having a separate date table "...
- 3 years ago
Ok. for the calculated column:
Running total by Year = VAR _Year = YEAR ( fTable[date] ) RETURN CALCULATE ( SUM ( fTable[Value] ), FILTER ( fTable, fTable[date] <= EARLIER ( fTable[date] ) && YEAR ( fTable[date] ) = _Year ) )As a measure
the model:
YTD measure = TOTALYTD(SUM(fTable[Value]), 'Calendar Table'[CalDate])
PaulDBrown
3 years agoCommunity Champion
Ok. for the calculated column:
Running total by Year =
VAR _Year =
YEAR ( fTable[date] )
RETURN
CALCULATE (
SUM ( fTable[Value] ),
FILTER (
fTable,
fTable[date] <= EARLIER ( fTable[date] )
&& YEAR ( fTable[date] ) = _Year
)
)
As a measure
the model:
YTD measure =
TOTALYTD(SUM(fTable[Value]), 'Calendar Table'[CalDate])
Febin
3 years agoFrequent Visitor
Hi, Thank you very much!!
- It worked!