Forum Discussion
Dannismen
5 years agoHelper I
Cumulative/YTD formulas wrong
Hi everyone. I've used this formula to calculate ytd value but somehow at March 28th, 2021 it always gave me a spike it shouldn't have. Can someone plz help me on the formula? https://d...
- 5 years ago
FYTD = VAR __to = MAX( Combined[fiscal_BOW] ) VAR __from = MINX( CALCULATETABLE( Combined, ALL( Combined[fiscal_BOW] ), Combined[fiscal_BOW] <= __to ), Combined[fiscal_BOW] ) RETURN CALCULATE( SUM( Combined[Metric_Value] ), DATESBETWEEN( Combined[fiscal_BOW], __from, __to ) )
CNENFRNL
5 years agoCommunity Champion
FYTD =
VAR __to = MAX( Combined[fiscal_BOW] )
VAR __from =
MINX(
CALCULATETABLE(
Combined,
ALL( Combined[fiscal_BOW] ),
Combined[fiscal_BOW] <= __to
),
Combined[fiscal_BOW]
)
RETURN
CALCULATE(
SUM( Combined[Metric_Value] ),
DATESBETWEEN( Combined[fiscal_BOW], __from, __to )
)