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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

TOPN in Calculated Column

Aim:
I need to generate a calculated column that show the SUM of the last 6 results by person. 

Context:
Ordinarily do this as a measure, however, due to needing to put the result ( % Diff of Most Recent to Avg of Last 6) in a box and whisker plot it has to be as a calculated column. 

 

Intended Outcome:

NameMost Recent ResultSUM of Last 6AVG of Last 6% Diff of Most Recent to Avg of Last 6
Bob45.91259.1543.026.5%


Data Structure:

heastham_0-1666259612322.png

  • The relationship between the two tables is on the FT_PlayerID. 
  • The Box & Whisker CMJ Table has been calculated as a summary table with the following DAX: 

 

Box & Whisker CMJ = 
SUMMARIZE(
    'CMJ Results',
    'CMJ Results'[PlayerName],
    Players[FT_PlayerId],
    "Most Recent CMJ", CALCULATE(MAX('CMJ Results'[Max Height]),LASTDATE('CMJ Results'[SessionDate])),
    "Most Recent Session",MAX('CMJ Results'[SessionDate])
)

 

  • The player Index Number in the CMJ results table assigns a sub index so each player's test has an index number - this is so I can calulcate the TOPN off.

Many thanks in advance! 

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

What is your table "CMJ Results" looks like?

Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.