Forum Discussion
sewaktamang
8 years agoFrequent Visitor
% Difference between two date value
How to get % Change between current Week and Previous Week? Any solution ?
- 8 years ago
It gives me correct values
Did you try this formula
Column = VAR Priorday = CALCULATE ( MAX ( TableName[Week] ), FILTER ( ALL ( TableName ), TableName[Week] < EARLIER ( TableName[Week] ) ) ) RETURN DIVIDE ( TableName[Conversions], CALCULATE ( SUM ( TableName[Conversions] ), FILTER ( TableName, TableName[Week] = Priorday ) ) ) - 1 - 8 years ago
Zubair_Muhammad
8 years agoCommunity Champion
Zubair_Muhammad
8 years agoCommunity Champion
A small improvement to this formula so that you do not get -100% for firstweek/firstdate
HIghlighted in RED font below
Column =
VAR Priorday =
CALCULATE (
MAX ( TableName[Week] ),
FILTER ( ALL ( TableName ), TableName[Week] < EARLIER ( TableName[Week] ) )
)
RETURN
IF (
NOT ( ISBLANK ( Priorday ) ),
DIVIDE (
TableName[Conversions],
CALCULATE (
SUM ( TableName[Conversions] ),
FILTER ( TableName, TableName[Week] = Priorday )
)
)
- 1
)