Forum Discussion
How to calculate the Average Performance for the previous entry vs latest entry
- 7 years ago
Hi ruyaselman ,
You need to create a new column.
Previous Week = CALCULATE ( FIRSTNONBLANK ( Sheet1[Progress], 1 ), FILTER ( Sheet1, Sheet1[date] = EARLIER ( Sheet1[date] ) - 7 && Sheet1[Task] = EARLIER ( Sheet1[Task] ) ) )Then edit your measure.
Progress for Previous Date = CALCULATE ( AVERAGE ( Sheet1[Previous Week] ) )
Here is the result.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 7 years ago
Hi ruyaselman ,
You can create a new column in "Original DS".
Previous Week = VAR a = CALCULATE ( LASTDATE ( 'Original DS'[PrgDate] ), ALL ( 'Original DS' ) ) RETURN IF ( 'Original DS'[PrgDate] = a, BLANK (), 'Original DS'[PrgDate] )Then edit your meaure "Progress for Previous Date Original DS"
Progress for Previous Date Original DS = CALCULATE(AVERAGE('Original DS'[Task Progress %]),LASTDATE('Original DS'[Previous Week]))Here is the result:
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ruyaselman ,
You can create a new column in "Original DS".
Previous Week =
VAR a =
CALCULATE ( LASTDATE ( 'Original DS'[PrgDate] ), ALL ( 'Original DS' ) )
RETURN
IF ( 'Original DS'[PrgDate] = a, BLANK (), 'Original DS'[PrgDate] )
Then edit your meaure "Progress for Previous Date Original DS"
Progress for Previous Date Original DS =
CALCULATE(AVERAGE('Original DS'[Task Progress %]),LASTDATE('Original DS'[Previous Week]))
Here is the result:
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear v-eachen-msft ,
Thank you so much for your support and immediate response. With this function it worked.
Just to understand, why did we need the Variable? Could you please tell? I never used it before actually.
Best Regards,