Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
imo3220
Frequent Visitor

Help Badly Needed!

Hi,

 

Thank you for coming here.

 

I want to see how each 'Key' progress in the National Percentile Rank over the test dates. I need the progress as percentage and values if possible.

 

My table is below;

 

KeyDate of TestNational Percentile Rank
23407/06/202260
23309/09/202168
23431/05/202384
55507/04/202169
55504/05/202385
78907/04/202160
78909/04/202270
78910/04/202380
1 ACCEPTED SOLUTION
Shravan133
Super User
Super User

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)

View solution in original post

4 REPLIES 4
Shravan133
Super User
Super User

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?

replace table with your table name.

PercentileChange =
VAR CurrentTestDate = MAX('YourTableName'[Date of Test])
VAR PreviousTestDate =
CALCULATE(
MAX('YourTableName'[Date of Test]),
FILTER(
'YourTableName',
'YourTableName'[Date of Test] < CurrentTestDate &&
'YourTableName'[Key] = EARLIER('YourTableName'[Key])
)
)
VAR CurrentPercentile = MAX('YourTableName'[National Percentile Rank])
VAR PreviousPercentile =
CALCULATE(
MAX('YourTableName'[National Percentile Rank]),
FILTER(
'YourTableName',
'YourTableName'[Date of Test] = PreviousTestDate &&
'YourTableName'[Key] = EARLIER('YourTableName'[Key])
)
)
RETURN
IF(
ISBLANK(PreviousPercentile),
BLANK(),
(CurrentPercentile - PreviousPercentile) / PreviousPercentile * 100
)

Ahh I done that, one was missing. Thank you!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors