Forum Discussion
Help Badly Needed!
- 2 years ago
Hi,
Try using this to calculate the %:
Percentile Change =
VAR CurrentTest = MAX('Table'[Date of Test])
VAR PreviousTest = CALCULATE(MAX('Table'[Date of Test]), FILTER('Table', 'Table'[Date of Test] < CurrentTest && 'Table'[Key] = EARLIER('Table'[Key])))
VAR CurrentPercentile = MAX('Table'[National Percentile Rank])
VAR PreviousPercentile = CALCULATE(MAX('Table'[National Percentile Rank]), FILTER('Table', 'Table'[Date of Test] = PreviousTest && 'Table'[Key] = EARLIER('Table'[Key])))
RETURN
IF(ISBLANK(PreviousPercentile), BLANK(), (CurrentPercentile - PreviousPercentile) / PreviousPercentile * 100)
Hi,
Try using this to calculate the %:
Percentile Change =
VAR CurrentTest = MAX('Table'[Date of Test])
VAR PreviousTest = CALCULATE(MAX('Table'[Date of Test]), FILTER('Table', 'Table'[Date of Test] < CurrentTest && 'Table'[Key] = EARLIER('Table'[Key])))
VAR CurrentPercentile = MAX('Table'[National Percentile Rank])
VAR PreviousPercentile = CALCULATE(MAX('Table'[National Percentile Rank]), FILTER('Table', 'Table'[Date of Test] = PreviousTest && 'Table'[Key] = EARLIER('Table'[Key])))
RETURN
IF(ISBLANK(PreviousPercentile), BLANK(), (CurrentPercentile - PreviousPercentile) / PreviousPercentile * 100)
Thank you for the response! It is much appreciated.
I am getting this error message;
This expression refers to a Partition object named 'Table[Table]', which has an error.
Any ideas?